登录
首页 » TCP/IP协议 » MFC TCP通讯

MFC TCP通讯

于 2023-04-17 发布 文件大小:98.22 MB
0 46
下载积分: 2 下载次数: 1

代码说明:

资源描述BOOL bClientRun = TRUE; CString ClientStrText; SocketClient::SocketClient(void){} SocketClient::~SocketClient(void){} CString SocketClient::GetClientString() { return ClientStrText; } void SocketClient::SetbClientRun(BOOL bBool) { bClientRun = bBool; } void ClientFun(LPVOID pArg) { while(bClientRun) { (*(Socket *)pArg).RecData(ClientStrText); } } void SocketClient::TCPClientStart(CString IP,CString Port) { TCPClient.SocketVersionInit(); TCPClient.SocketClientInit(IP,Port); hClientThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ClientFun,(LPVOID)&TCPClient,0,0); } void SocketClient::TCPClientSend(CString StrText) { TCPClient.SendData(StrText); } void SocketClient::TCPClientClose(CString StrText) { SetbClientRun(FALSE); if(hClientThre

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 104292会员总数
  • 28今日下载