Esempio n. 1
0
        public HttpServer(int port, HttpServerResponse callback)
        {
            this.ServerResponseCallback = callback;

            this.listener = new StreamSocketListener();
            this.listener.ConnectionReceived += (s, e) => ProcessRequestAsync(e.Socket);
            this.listener.BindServiceNameAsync(port.ToString());
        }
Esempio n. 2
0
        public HttpServer(int port, HttpServerResponse callback)
        {
            this.ServerResponseCallback = callback;

            this.listener = new StreamSocketListener();
            this.listener.ConnectionReceived += (s, e) => ProcessRequestAsync(e.Socket);
            this.listener.BindServiceNameAsync(port.ToString());
        }