示例#1
0
        private void OnClientDisconnected(ClientConnection client)
        {
            client.ReceivedTextualData -= OnReceivedTextualData;
            client.Disconnected -= OnClientDisconnected;

            Console.WriteLine("Client {0} Disconnected...", client.Id);
        }
示例#2
0
        private void OnClientConnected(ClientConnection client)
        {
            client.ReceivedTextualData += OnReceivedTextualData;
            client.Disconnected += OnClientDisconnected;
            client.StartReceiving();

            Console.WriteLine("Client {0} Connected...", client.Id);
        }
示例#3
0
 private void OnReceivedTextualData(ClientConnection client, string data)
 {
     Console.WriteLine("Client {0} Received Message: {1}", client.Id, data);
     client.Send(data);
 }