1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#pragma once #include <cstdint> #include <thread> class PBSocket { public: PBSocket(char* addr, uint16_t port); void connect(char* addr, uint16_t port); private: PBSocket(); void sock_task(); std::thread _thread; };