private static byte[] PacketToBytes(ProtocolPacket packet)
        {
            BinaryDataWriter writer = new BinaryDataWriter();

            packet.GetData(writer);
            return(writer.ToArray());
        }
예제 #2
0
        static string PacketToString(ProtocolPacket packet)
        {
            TextDataWriter writer = new TextDataWriter();

            writer.Write(packet.CommandId.ToString());
            packet.GetData(writer);
            return(writer.ToString());
        }