예제 #1
0
파일: GateClient.cs 프로젝트: Hoikas/mudpit
        public uint Ping(uint pingTime, byte[] payload)
        {
            Gate_PingPong ping = new Gate_PingPong();
            ping.fPayload = payload;
            ping.fPingTime = pingTime;
            ping.fTransID = IGetTransID();

            ResetIdleTimer();
            lock (fStream) {
                fStream.BufferWriter();
                fStream.WriteUShort((ushort)GateCli2Srv.PingRequest);
                ping.Write(fStream);
                fStream.FlushWriter();
            }

            return ping.fTransID;
        }
예제 #2
0
파일: GateClient.cs 프로젝트: Hoikas/mudpit
 private void IPong()
 {
     Gate_PingPong pong = new Gate_PingPong();
     pong.Read(fStream);
     if (Pong != null)
         Pong(pong.fTransID, pong.fPingTime, pong.fPayload);
 }