Beispiel #1
0
			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);
			}
 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);
 }
Beispiel #3
0
        async void HandleNextConnection()
        {
            Task <TcpClient> task;

            lock (_syncRoot)
            {
                if (_listener == null)
                {
                    return;
                }
                task = _listener.AcceptTcpClientAsync();
            }
            var cl = await task;

            HandleNextConnection();
            TcpHostConnection.HandleNew(this, cl, _engine);
        }