private void WriteHeaders(Writer w) { UpdateHeaders(); w.Write(Header.OpCode); w.Write(Header.DataSize); }
public Packet(PacketHeader header, MemoryStream memoryStream) { Header = header; Stream = memoryStream; Reader = new Reader(Stream); Writer = new Writer(Stream); }
public Client(TcpClient client) { _client = client; Connected = true; Writer = new Writer(Stream); Reader = new Reader(Stream); new System.Threading.Tasks.Task(Receive).Start(); }
public void WritePacket(Writer w) { WriteHeaders(w); w.Write(GetDatasBytes()); }