예제 #1
0
파일: HttpServer.cs 프로젝트: RestRT/RestRT
        public HttpServer(int port, HttpServerResponseAsync callback)
        {
            this.ServerResponseCallbackAsync = callback;

            this.listener = new StreamSocketListener();
            this.listener.ConnectionReceived += (s, e) => ProcessRequestAsync(e.Socket);
            this.listener.BindServiceNameAsync(port.ToString());
        }
예제 #2
0
        public HttpServer(int port, HttpServerResponseAsync callback)
        {
            this.ServerResponseCallbackAsync = callback;

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