private void CM_PING(CMSG_PING cpkt) { SMSG_PONG spkt = new SMSG_PONG(); spkt.SessionId = cpkt.SessionId; this.Send((byte[])spkt); }
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); }
public static async Task OnPing(WorldClient client, byte[] data) { var request = new CMSG_PING(data); await client.SendPacket(new SMSG_PONG(request.Latency)); }
public static async Task OnPing(PacketHandlerContext c) { var request = new CMSG_PING(c.Packet); await c.Client.SendPacket(new SMSG_PONG(request.Latency)); }
/// <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)); }