public static void Handle_CS_Initiate(CS_Initiate pkt, DirectoryClient client) { var packet = new SC_Initiate(); packet.RandChallengeToken = pkt.RandChallengeToken; client.send(packet); }
/// <summary> /// Called after a client gets the first packet of CS_ZoneList() /// </summary> /// <param name="pkt"></param> /// <param name="client"></param> public static void Handle_CS_AckZoneList(CS_AckZoneList pkt, DirectoryClient client) { //Update the zone list first.. //Program.server.grabZones(); List <SC_ZoneList> packets = Program.server.ZoneStream.Packets; UInt16 frame = pkt.frameReceived; // Can we send the next frame? if (++frame < packets.Count) { client.send(packets[frame]); } }
/// <summary> /// Called when a client clicks "Refresh Zone List" /// </summary> /// <param name="pkt"></param> /// <param name="client"></param> public static void Handle_CS_ZoneList(CS_ZoneList pkt, DirectoryClient client) { //Update the zone list first.. //Program.server.grabZones(); // Begin sending the zone list packets client.ZoneListToken = pkt.Token; // Send the first packet List <SC_ZoneList> packets = Program.server.ZoneStream.Packets; if (packets.Count != 0) { client.send(packets[0]); } }