예제 #1
0
파일: AuthClient.cs 프로젝트: Hoikas/mudpit
 private void IPong()
 {
     Auth_PingPong reply = new Auth_PingPong();
     reply.Read(fStream);
     if (Pong != null)
         Pong(reply.fTransID, reply.fPingTime, reply.fPayload);
 }
예제 #2
0
파일: AuthClient.cs 프로젝트: Hoikas/mudpit
        public uint Ping(uint pingTime, byte[] payload)
        {
            Auth_PingPong req = new Auth_PingPong();
            req.fPayload = payload;
            req.fPingTime = pingTime;
            req.fTransID = IGetTransID();

            ResetIdleTimer();
            lock (fStream) {
                fStream.BufferWriter();
                fStream.WriteUShort((ushort)AuthCli2Srv.PingRequest);
                req.Write(fStream);
                fStream.FlushWriter();
            }

            return req.fTransID;
        }