Exemple #1
0
        static void ClientMessage(WunderPacket packet)
        {
            Console.WriteLine(packet.ToString());
            var toSend = wc.GetNewPacket("VariableLengthPacket");
            var resp   = wc.GetNewPacket("Message");

            for (int i = 0; i < 50; i++)
            {
                toSend.Set("FieldOne", 42);
                toSend.Clear("FieldString");
                wc.Send(toSend);


                resp.Set("MessageData", "I'm The Client Sending a lot of data!");
                wc.Send(resp);

                toSend.Set("FieldOne", 37);
                toSend.Set("FieldString", "A Variable Packet");
                wc.Send(toSend);
            }
        }
Exemple #2
0
 static void ServerMessage(ClientHandler client, WunderPacket packet)
 {
     Console.WriteLine(packet.ToString());
 }