The HttpListener type exposes the following members.

Constructors

  NameDescription
Public methodHttpListener(String)
Creates an HTTP or HTTPS listener on the standard ports.
Public methodHttpListener(String, Int32)
Creates an HTTP or HTTPS listener on the specified port.

Methods

  NameDescription
Public methodAbort
Shuts down the HttpListener object immediately, discarding all currently queued requests.
Public methodClose
Shuts down the HttpListener after processing all currently queued requests.
Public methodGetContext
Waits for an incoming request and returns when one is received.
Public methodStart
Allows this instance to receive incoming requests.
Public methodStop
Causes this instance to stop receiving incoming requests.

Properties

  NameDescription
Public propertyIsListening
Gets whether the HttpListener service was started and is waiting for client connections.
Public propertyMaximumResponseHeadersLength
Gets or sets the maximum allowed length of the response headers, in KB.

See Also