diff options
Diffstat (limited to 'client/sock.h')
-rw-r--r-- | client/sock.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/client/sock.h b/client/sock.h index e3d7ec8..0f9a3fc 100644 --- a/client/sock.h +++ b/client/sock.h @@ -5,17 +5,24 @@ class PBSocket { public: + PBSocket(); PBSocket(char* addr, uint16_t port); + virtual ~PBSocket(); - void connect(char* addr, uint16_t port); + void set_server(char* addr, uint16_t port); -private: - PBSocket(); + void sock_connect(); +private: void sock_task(); + void sock_close(); - std::thread _thread; + std::thread* _thread = nullptr; -}; + char* _addr = NULL; + uint16_t _port = 0; + + int _fd = -1; +}; |