Exemplo n.º 1
0
Arquivo: Packet.cs Projeto: tgy/CSharp
        private void WriteHeaders(Writer w)
        {
            UpdateHeaders();

            w.Write(Header.OpCode);
            w.Write(Header.DataSize);
        }
Exemplo n.º 2
0
Arquivo: Packet.cs Projeto: tgy/CSharp
 public Packet(PacketHeader header, MemoryStream memoryStream)
 {
     Header = header;
     Stream = memoryStream;
     Reader = new Reader(Stream);
     Writer = new Writer(Stream);
 }
Exemplo n.º 3
0
Arquivo: Client.cs Projeto: tgy/CSharp
        public Client(TcpClient client)
        {
            _client = client;
            Connected = true;

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

            new System.Threading.Tasks.Task(Receive).Start();
        }
Exemplo n.º 4
0
Arquivo: Packet.cs Projeto: tgy/CSharp
 public void WritePacket(Writer w)
 {
     WriteHeaders(w);
     w.Write(GetDatasBytes());
 }