示例#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());
        }
示例#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());
        }