Esempio n. 1
0
 private void messageReceived(Packet packet, Connection connection)
 {
     TalkPacket request = (TalkPacket)packet;
     TalkPacket response = new TalkPacket();
     response.Message = "Message returning from server: " + request.Message;
     connection.Send(response);
 }
Esempio n. 2
0
        private void connectionEstablished(Connection connection, ConnectionType connectionType)
        {
            TalkPacket talkPacket = new TalkPacket();
            talkPacket.Message = "Hello World!";

            Console.WriteLine("Client: Connection Established!");
            connection.Send(talkPacket);
        }