[server] Bugfix: Actually start the TcpListener
This commit is contained in:
parent
9e19127699
commit
9569e2c59b
1 changed files with 2 additions and 0 deletions
|
@ -99,11 +99,13 @@ namespace PixelHub.Server
|
|||
public async Task Listen()
|
||||
{
|
||||
server = new TcpListener(Endpoint);
|
||||
server.Start();
|
||||
logger.WriteLine("TCP Listener set up on {0}.", Endpoint);
|
||||
Active = true;
|
||||
while(true)
|
||||
{
|
||||
TcpClient nextClient = await server.AcceptTcpClientAsync();
|
||||
Console.WriteLine("Got connection");
|
||||
AsyncTools.ForgetTask(Handle(nextClient));
|
||||
}
|
||||
// TODO: Add an shutdown CancellationToken thingy here
|
||||
|
|
Reference in a new issue