Beispiel #1
0
        static void ServerMessage(ClientHandler client, WunderPacket packet)
        {
            Console.WriteLine(packet.Get("MessageData"));
            var resp = ws.GetNewPacket("Message");

            resp.Set("MessageData", "I'm the Server Responding to the Client Message");
            client.Send(resp);
            ws.Disconnect();
        }
Beispiel #2
0
        static void ClientMessage(WunderPacket packet)
        {
            Console.WriteLine(packet.Get("MessageData"));

            var lotsofdata = wc.GetNewPacket("WorldInfo");

            for (int i = 0; i < 100; i++)
            {
                lotsofdata.Set("Width", i * 10);
                wc.Send(lotsofdata);
            }


            var resp = wc.GetNewPacket("Message");

            resp.Set("MessageData", "I'm a client responding to the server!");
            wc.Send(resp);
        }
Beispiel #3
0
 static void ServerWorldInfo(ClientHandler client, WunderPacket packet)
 {
     Console.WriteLine(packet.Get("Width"));
 }