コード例 #1
0
        /// <summary>
        /// Initializes a HttpListener.
        /// </summary>
        /// <param name="endpoint"></param>
        public HttpListener(IPAddress address, int port) : this()
        {
            LocalEndpoint = new IPEndPoint(
                address,
                port);

            _tcpListener = new TcpListenerAdapter(LocalEndpoint);
        }
コード例 #2
0
ファイル: HttpListener.cs プロジェクト: naice/Jens
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpListener"/> class.
 /// </summary>
 /// <param name="endpoint">The endpoint.</param>
 public HttpListener(IPEndPoint endpoint, IHttpHandler handler, CancellationToken cancellationToken) : this(handler, cancellationToken)
 {
     _tcpListener = new TcpListenerAdapter(endpoint, cancellationToken);
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpListener"/> class.
 /// </summary>
 /// <param name="endpoint">The endpoint.</param>
 public HttpListener(IPEndPoint endpoint) : this()
 {
     _tcpListener = new TcpListenerAdapter(endpoint);
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpListener"/> class.
 /// </summary>
 /// <param name="endpoint">The endpoint.</param>
 public HttpListener(IPEndPoint endpoint, IHttpHandler handler) : this(handler)
 {
     _tcpListener = new TcpListenerAdapter(endpoint);
 }