Beispiel #1
0
 public Packet(PacketHeader header, MemoryStream memoryStream)
 {
     Header = header;
     Stream = memoryStream;
     Reader = new Reader(Stream);
     Writer = new Writer(Stream);
 }
Beispiel #2
0
        public Client(TcpClient client)
        {
            _client = client;
            Connected = true;

            Writer = new Writer(Stream);
            Reader = new Reader(Stream);

            new System.Threading.Tasks.Task(Receive).Start();
        }
Beispiel #3
0
 public static PacketHeader GetHeader(Reader r)
 {
     return new PacketHeader(r.ReadByte(), r.ReadByte());
 }