public void OnConnected(IConnection connection) { Console.WriteLine("connected from:" + connection.RemoteEndPoint.ToString()); //开始接收数据,没有这个操作将不接受该连接发送的数据 connection.BeginReceive(); }