コード例 #1
0
        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();
        }
コード例 #2
0
 public override Stream StartPacket(String typeName)
 {
     return(StartPacket(PacketManager.GetType(typeName)));
 }
コード例 #3
0
 protected override bool ReadPacket(Stream stream)
 {
     base.ReadPacket(stream);
     return(PacketManager.HandlePacket(this, stream));
 }