Пример #1
0
        void onTest()
        {
            Client client = new Client(++clinet_id_);

            client.Connect(TransportProtocol.kTcp, FunEncoding.kProtobuf);
            while (!client.Connected)
            {
                Thread.Sleep(10);
            }

            client.SendEchoMessageWithCount(TransportProtocol.kTcp, 1000);
            while (!client.IsDone)
            {
                Thread.Sleep(10);
            }

            client.Stop();
            client = null;
        }
Пример #2
0
 void onConnected(Client client)
 {
     client.SendEchoMessageWithCount(TransportProtocol.kTcp, 5);
 }