#ifndef SocketH #define SocketH #include #include //#include using namespace std; class Socket { private: string host; int port; SOCKET socket; public: Socket(string host, int port); Socket(SOCKET socket); // wird zur Socketerzeugung beim ServerSocket benoetigt bool connect(); int dataAvailable(); void write(int b); void write(const char* b, int len); void write(string s); int read(); int read(char* b, int len); string readLine(); void close(); }; #endif