private void OnClientDisconnected(ClientConnection client) { client.ReceivedTextualData -= OnReceivedTextualData; client.Disconnected -= OnClientDisconnected; Console.WriteLine("Client {0} Disconnected...", client.Id); }
private void OnClientConnected(ClientConnection client) { client.ReceivedTextualData += OnReceivedTextualData; client.Disconnected += OnClientDisconnected; client.StartReceiving(); Console.WriteLine("Client {0} Connected...", client.Id); }
private void OnReceivedTextualData(ClientConnection client, string data) { Console.WriteLine("Client {0} Received Message: {1}", client.Id, data); client.Send(data); }