#ifdef WIN32 #include<windows.h> #else #include<string.h> #include<unistd.h> #include<stdlib.h> #include<arpa/inet.h> #include<sys/types.h> #include<sys/socket.h> #define closesocket close; #endif #include<stdio.h> #include<thread> class Tcp { public: void Main() { char buf[1024] = { 0 }; for (;;) { int recvlen = recv(client, buf, sizeof(buf) - 1, 0); if (recvlen<0) { break; } buf[recvlen] = '