Handle() public method

public Handle ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
Example #1
0
        public async Task ListenAsync(ushort Port, string Address = "0.0.0.0")
        {
            TcpListener = new TcpListener(IPAddress.Parse(Address), Port);
            TcpListener.Start();
            //if (Debug)
            {
                await Console.Out.WriteLineAsync(String.Format("Listening {0}:{1}", Address, Port));
            }

            while (true)
            {
                var FastcgiServerClientHandlerAsync = new FastcgiServerClientHandlerAsync(this, await TcpListener.AcceptTcpClientAsync());
                FastcgiServerClientHandlerAsync.Handle();
                //await FastcgiServerClientHandlerAsync.Handle();
            }
        }
Example #2
0
		public async Task ListenAsync(ushort Port, string Address = "0.0.0.0")
		{
			TcpListener = new TcpListener(IPAddress.Parse(Address), Port);
			TcpListener.Start();
			//if (Debug)
			{
				await Console.Out.WriteLineAsync(String.Format("Listening {0}:{1}", Address, Port));
			}
			
			while (true)
			{
				var FastcgiServerClientHandlerAsync = new FastcgiServerClientHandlerAsync(this, await TcpListener.AcceptTcpClientAsync());
				FastcgiServerClientHandlerAsync.Handle();
				//await FastcgiServerClientHandlerAsync.Handle();
			}
		}