public HttpServer(int serverPort, AppServiceConnection connection) { listener = new StreamSocketListener(); port = serverPort; appServiceConnection = connection; //Add event handler for HTTP connections listener.ConnectionReceived += (s, e) => ProcessRequestAsync(e.Socket); }