Example #1
0
 private void IPong()
 {
     Auth_PingPong reply = new Auth_PingPong();
     reply.Read(fStream);
     if (Pong != null)
         Pong(reply.fTransID, reply.fPingTime, reply.fPayload);
 }
Example #2
0
        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;
        }