Exemplo n.º 1
0
        public void sendPacket(SendServerPacket pk)
        {
            pk.write();
            List <byte> blist = new List <byte>();

            byte[] db  = pk.ToByteArray();
            short  len = (short)db.Length;

            blist.AddRange(BitConverter.GetBytes(len));
            blist.AddRange(db);
            nstream.Write(blist.ToArray(), 0, blist.Count);
            nstream.Flush();
        }