public async Task ListenLoop() { while (this.isRunning) { var client = listener.AcceptSocket(); ConnectionHandler connectionHandler = new ConnectionHandler(client, this.serverRoutingTable); connectionHandler.ProcessRequestAsync(); } }
public async Task ListenLoop() { while (_isRuning) { Socket client = await _listener.AcceptSocketAsync(); ConnectionHandler connectionHandler = new ConnectionHandler(client, _handlerContext); await connectionHandler.ProcessRequestAsync(); } }
public async Task ListenLoop() { while (this.isRunning) { Socket client = await this.tcpListener.AcceptSocketAsync(); ConnectionHandler connectionHandler = new ConnectionHandler(client, this.routeHandler, this.resourceHandler); await connectionHandler.ProcessRequestAsync(); } }
public async Task ListenLoop() { while (this.IsRunning) { var client = await this.listener.AcceptSocketAsync(); var connectionHandler = new ConnectionHandler(client, this.serverRoutingTable); var responseTask = connectionHandler.ProcessRequestAsync(); responseTask.Wait(); } }
public async Task ListenLoop() { while (this.isRunning) { Socket client = await this.listener.AcceptSocketAsync(); ConnectionHandler connectionHandler = new ConnectionHandler(client, this.router); Task responseTask = connectionHandler.ProcessRequestAsync(); await responseTask; } }
public async Task ListenLoop() { while (this.isRunning) { var client = await this.listener.AcceptSocketAsync(); var connectionHandler = new ConnectionHandler(client, this.routeHandlingContext); await connectionHandler.ProcessRequestAsync(); } }
public async Task ListenLoop() { while (this.IsRunning) { var client = await this._listener.AcceptSocketAsync(); var connectionHandler = new ConnectionHandler(client, this.handler, this.resourceRouter);; var responseTask = connectionHandler.ProcessRequestAsync(); responseTask.Wait(); } }
public async Task ListenLoop() { while (this.isRunning) { Socket client = await this.listener.AcceptSocketAsync(); ConnectionHandler connectionHandler = new ConnectionHandler(client, this.serverRoutingTable); //Task connection = connectionHandler.ProcessRequestAsync(); //connection.Wait(); await connectionHandler.ProcessRequestAsync(); } }
public async Task ListenLoop() { while (this.isRunning) { var client = await this.listener.AcceptSocketAsync(); var connectionHandler = new ConnectionHandler(client, this.handler); var responseTask = connectionHandler.ProcessRequestAsync(); responseTask.Wait(); //Endless Cycle } }
public async Task ListenLoop() { Console.WriteLine("Listen loop started!"); while (this.IsRunning) { var client = await this.listener.AcceptSocketAsync(); var connectionHandler = new ConnectionHandler(client, this.serverRoutingTable); var responseTask = connectionHandler.ProcessRequestAsync(); responseTask.Wait(); Console.WriteLine("New request handled!"); } }
public async Task ListenLoop() { while (this.isRunning) { Console.WriteLine("Waiting for client..."); Socket client = await this.listener.AcceptSocketAsync(); var connectionHandler = new ConnectionHandler(client, this.serverRoutingTable); Task responseTask = connectionHandler.ProcessRequestAsync(); responseTask.Wait(); } }
public async Task ListenLoop() { while (this.isRunning) { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; var client = await this.listener.AcceptSocketAsync(); var connectionHandler = new ConnectionHandler(client, this.serverRoutingTable); var responseTask = connectionHandler.ProcessRequestAsync(); responseTask.Wait(); } }
public async Task ListenLoop() { while (this.isRunning) { Socket client = await this.listener.AcceptSocketAsync(); StringBuilder result = new StringBuilder(); result.AppendLine(new string('=', 60)); result.AppendLine($"Client Connected on {DateTime.Now.ToString(DateTimeFormat)}"); result.AppendLine(new string('=', 60)); Console.WriteLine(result.ToString()); ConnectionHandler connectionHandler = new ConnectionHandler(client, this.serverRoutingTable); Task responseTask = connectionHandler.ProcessRequestAsync(); responseTask.Wait(); } }
private async Task ListenLoopAsync() { while (IsRunning) { if (listener.Pending()) { Socket client = await listener.Server.AcceptAsync(); var connection = new ConnectionHandler(client, services, sessions); Task responseTask = connection.ProcessRequestAsync(); string clientAddress = client.RemoteEndPoint.ToString().Split(':')[0]; if (!uniqueConnections.Any(c => c == clientAddress)) { Console.WriteLine($"Connection established from address {clientAddress}"); uniqueConnections.Add(clientAddress); } responseTask.Wait(); } } }
private async Task ListenLoopAsync() { while (IsRunning) { if (listener.Pending()) { Socket client = await listener.Server.AcceptAsync(); if (!uniqueClients.Any(c => c.Handle == client.Handle)) { Console.Write($"{Environment.UserDomainName}/{Environment.UserName}"); Console.WriteLine($" connected [Handle: {client.Handle}]"); uniqueClients.Add(client); } var connection = new ConnectionHandler(client, services); Task responseTask = connection.ProcessRequestAsync(); responseTask.Wait(); } } }
public async Task ListenLoop(Socket client) { var connectionHandler = new ConnectionHandler(client, this.requestHandler, this.fileHandler); await connectionHandler.ProcessRequestAsync(); }
private async Task ListenAsync(Socket client) { var connectionHandler = new ConnectionHandler(client, this.serverRoutingTable); await connectionHandler.ProcessRequestAsync(); }
public async void ListenLoop(Socket client) { ConnectionHandler connectionHandler = new ConnectionHandler(client, this.handlerContext); await connectionHandler.ProcessRequestAsync(); }
public async void Listen(Socket client) { var connectionHandler = new ConnectionHandler(client, this.handler); await connectionHandler.ProcessRequestAsync(); }
public async void Listen(Socket client) { var connectionHandler = new ConnectionHandler(client, this.serverRoutingTable); await connectionHandler.ProcessRequestAsync(); }
public async Task ListenLoopAsync(Socket client) { var connectionHandler = new ConnectionHandler(client, handler); await connectionHandler.ProcessRequestAsync(); }