Пример #1
0
        private void CM_PING(CMSG_PING cpkt)
        {
            SMSG_PONG spkt = new SMSG_PONG();

            spkt.SessionId = cpkt.SessionId;
            this.Send((byte[])spkt);
        }
Пример #2
0
        public static PacketProcessResult HandlePing(PacketProcessor p)
        {
            CMSG_PING pkt = new CMSG_PING();

            pkt.Read(p.CurrentPacket);

            PacketOut pout = new PacketOut(RealmOp.SMSG_PONG);

            pout.Write(pkt.ping);
            pout.Finalise();
            p.ClientConnection.Send(pout.strm.ToArray());

            return(PacketProcessResult.Processed);
        }
Пример #3
0
 public static async Task OnPing(WorldClient client, byte[] data)
 {
     var request = new CMSG_PING(data);
     await client.SendPacket(new SMSG_PONG(request.Latency));
 }
Пример #4
0
 public static async Task OnPing(PacketHandlerContext c)
 {
     var request = new CMSG_PING(c.Packet);
     await c.Client.SendPacket(new SMSG_PONG(request.Latency));
 }
Пример #5
0
 /// <summary>
 ///     Packet received of the client to ping the server.
 /// </summary>
 /// <param name="session"></param>
 /// <param name="handler"></param>
 public static void Handler(RealmServerSession session, CMSG_PING handler)
 {
     session.SendPacket(new SMSG_PONG(handler.Latency));
 }