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; }
void onConnected(Client client) { client.SendEchoMessageWithCount(TransportProtocol.kTcp, 5); }