Test.ServerHandler.OnConnected C# (CSharp) Méthode

OnConnected() public méthode

public OnConnected ( IConnection connection ) : void
connection IConnection
Résultat void
        public void OnConnected(IConnection connection)
        {
            Console.WriteLine("connected from:" + connection.RemoteEndPoint.ToString());

            //开始接收数据,没有这个操作将不接受该连接发送的数据
            connection.BeginReceive();
        }