1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifndef csocket_h__ #define csocket_h__ class CSocket { protected: SOCKET m_socket; public: CSocket(SOCKET socket = INVALID_SOCKET): m_socket(socket) {} int Recv(char *buf, int count); int Send(char *buf, int count = -1); void Close(); }; #endif // csocket_h__