예제 #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);
			}
예제 #2
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);
 }
예제 #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);
        }