当SOCKET进行接收时,用到SOCKADDR_IN 结构,假设变量为:client
CString strIP;
strIP = inet_ntoa(client.sin_addr);
便获得源主机的IP地址