public void SendPacketDictionary() { Stream stream = StartPacket(PTPacketDictionary); BinaryWriter writer = new BinaryWriter(stream); ClientPacketType[] types = PacketManager.GetAllTypes(); writer.Write((UInt16)types.Length); foreach (ClientPacketType t in types) { writer.Write(t.Name); writer.Write(t.ID); } SendPacket(); }
public override Stream StartPacket(String typeName) { return(StartPacket(PacketManager.GetType(typeName))); }
protected override bool ReadPacket(Stream stream) { base.ReadPacket(stream); return(PacketManager.HandlePacket(this, stream)); }