Socket.h 476 B

123456789101112131415161718192021
  1. #ifndef SOCKET_H
  2. #define SOCKET_H
  3. class Socket final {
  4. public:
  5. Socket();
  6. ~Socket();
  7. Socket(const Socket& other) = delete;
  8. Socket(Socket&& other) = delete;
  9. Socket& operator=(const Socket& other) = delete;
  10. Socket& operator=(Socket&& other) = delete;
  11. bool start(uint16_t port);
  12. int waitForClients(int timeoutMillis) const;
  13. bool readConsole(char* buffer, size_t bufferLength, int timeoutMillis) const;
  14. private:
  15. int id;
  16. };
  17. #endif