Example #1
0
 public static async Task SendTransportPacket(NetworkStream sw, TransportPacketType type, byte[] Data)
 {
     TransportPacket tp = new TransportPacket(Data, type, Constants.TransportVersion);
     byte[] msg = PacketCodec.CreateTransportPacket(tp);
     sw.Write(msg, 0, msg.Length);
     await sw.FlushAsync();
 }
Example #2
0
 public TransportPacket(byte[] Data, TransportPacketType Type, byte Version)
 {
     this.Data = Data;
     this.Type = Type;
     this.Version = Version;
 }