public Request(TcpHostConnection conn, byte[] rawData) { _conn = conn; _requestId = BitConverter.ToUInt64(rawData, 0); Data = new byte[rawData.Length - 8]; Array.Copy(rawData, 8, Data, 0, Data.Length); }
async void HandleNextConnection() { Task <TcpClient> task; lock (_syncRoot) { if (_listener == null) { return; } task = _listener.AcceptTcpClientAsync(); } TcpClient cl; try { cl = await task; } catch { // return; } HandleNextConnection(); TcpHostConnection.HandleNew(this, cl, _engine); }