以下是tcp socket客户端和服务端源码,代码简单大家参考使用吧Tcp Server 代码如下:#include #include #pragma comment(lib, “ws2_32.lib”)int main(){// initial socket libraryWORD wVerisonRequested;WSADATA wsaData;int err;wVerisonRequested = MAKEWORD(1, 1);err = WSAStartup(wVerisonReque