Socket clientSock = ServerSocket.Accpet();
接受客户端连接
DateTime connectTime = DateTime.Now;
连接一个客户端后,当前时间就是连接时间。
(clientSock.RemoteEndPoint as IPEndPoint).IPAddress;
ip地址
(clientSock.RemoteEndPoint as IPEndPoint).Port;
端口号
Client.RemoteEndPoint