资 源 简 介
资源描述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