1.判断socket是否连接状态:
recv = client.Receive(data);//阻塞,返回接收到的字节数,当检测到客户机关闭会话,发送TCP FIN包时,就返回0
if(recv == 0)
break;
1.判断socket是否连接状态:
recv = client.Receive(data);//阻塞,返回接收到的字节数,当检测到客户机关闭会话,发送TCP FIN包时,就返回0
if(recv == 0)
break;