websocket-sharp : WebSocketSharp.Net Namespace

# HttpListener Class

Provides a simple, programmatically controlled HTTP listener.

## Syntax

public sealed class HttpListener : IDisposable

## Remarks

Documentation for this section has not yet been entered.

## Requirements

Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)

## Members

See Also: Inherited members from object.

## Public Constructors

| HttpListener () | Initializes a new instance of the WebSocketSharp.Net.HttpListener class.

## Public Properties

| AuthenticationSchemes | AuthenticationSchemes . Gets or sets the scheme used to authenticate the clients.
| AuthenticationSchemeSelectorDelegate | AuthenticationSchemeSelector . Gets or sets the delegate called to determine the scheme used to authenticate clients.
| IgnoreWriteExceptions | bool . Documentation for this section has not yet been entered.
[read-only] | IsListening | bool . Gets a value indicating whether the WebSocketSharp.Net.HttpListener has been started.
[read-only] static | IsSupported | bool . Gets a value indicating whether the WebSocketSharp.Net.HttpListener can be used with the current operating system.
[read-only] | Prefixes | HttpListenerPrefixCollection . Gets the URI prefixes handled by the WebSocketSharp.Net.HttpListener.
| Realm | string . Gets or sets the name of the realm associated with the WebSocketSharp.Net.HttpListener.
| UnsafeConnectionNtlmAuthentication | bool . Documentation for this section has not yet been entered.

## Public Methods

| Abort () Shuts down the WebSocketSharp.Net.HttpListener immediately.
| BeginGetContext (AsyncCallback, object) : IAsyncResult Begins getting an incoming request information asynchronously.
| Close () Shuts down the WebSocketSharp.Net.HttpListener.
| EndGetContext (IAsyncResult) : HttpListenerContext Ends an asynchronous operation to get an incoming request information.
| GetContext () : HttpListenerContext Gets an incoming request information.
| Start () Starts to receive incoming requests.
| Stop () Stops receiving incoming requests.

## Explicitly Implemented Interface Members

| IDisposable.Dispose | Releases all resource used by the WebSocketSharp.Net.HttpListener.

## Extension Methods

static | IsNull<T> (this T) : bool Determines whether the specified object is `null`.
static | IsNullDo<T> (this T, Action) : bool Determines whether the specified object is `null`. And invokes the specified Action delegate if the specified object is `null`.

## Member Details

### HttpListener Constructor

> Initializes a new instance of the WebSocketSharp.Net.HttpListener class.

> ## Syntax

> public HttpListener ()

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Abort Method

> Shuts down the WebSocketSharp.Net.HttpListener immediately.

> ## Syntax

> public void Abort ()

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### AuthenticationSchemes Property

> Gets or sets the scheme used to authenticate the clients.

> ## Syntax

> public AuthenticationSchemes AuthenticationSchemes { get; set; }

> #### Value

> > One of the WebSocketSharp.Net.AuthenticationSchemes values that indicates the scheme used to authenticate the clients. The default value is AuthenticationSchemes.Anonymous.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### AuthenticationSchemeSelectorDelegate Property

> Gets or sets the delegate called to determine the scheme used to authenticate clients.

> ## Syntax

> public AuthenticationSchemeSelector AuthenticationSchemeSelectorDelegate { get; set; }

> #### Value

> > A WebSocketSharp.Net.AuthenticationSchemeSelector delegate that invokes the method(s) used to select an authentication scheme. The default value is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### BeginGetContext Method

> Begins getting an incoming request information asynchronously.

> ## Syntax

> public IAsyncResult BeginGetContext (AsyncCallback callback, object state)

> #### Parameters

> > callback
> >   An AsyncCallback delegate that references the method(s) called when the asynchronous operation completes.
> > state
> >   An object that contains a user defined object to pass to the callback delegate.

> #### Returns

> > An IAsyncResult that contains the status of the asynchronous operation.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > InvalidOperationException | The WebSocketSharp.Net.HttpListener has not been started or is stopped currently.

> ## Remarks

> This asynchronous operation must be completed by calling the HttpListener.EndGetContext(IAsyncResult) method. Typically, the method is invoked by the callback delegate.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Close Method

> Shuts down the WebSocketSharp.Net.HttpListener.

> ## Syntax

> public void Close ()

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### EndGetContext Method

> Ends an asynchronous operation to get an incoming request information.

> ## Syntax

> public HttpListenerContext EndGetContext (IAsyncResult asyncResult)

> #### Parameters

> > asyncResult
> >   An IAsyncResult obtained by calling the HttpListener.BeginGetContext(AsyncCallback, object) method.

> #### Returns

> > A WebSocketSharp.Net.HttpListenerContext that contains a client's request information.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | asyncResult is `null`.
> > ArgumentException | asyncResult was not obtained by calling the HttpListener.BeginGetContext(AsyncCallback, object) method.
> > InvalidOperationException | The EndGetContext method was already called for the specified asyncResult.

> ## Remarks

> This method completes an asynchronous operation started by calling the HttpListener.BeginGetContext(AsyncCallback, object) method.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### GetContext Method

> Gets an incoming request information.

> ## Syntax

> public HttpListenerContext GetContext ()

> #### Returns

> > A WebSocketSharp.Net.HttpListenerContext that contains a client's request information.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > InvalidOperationException | The WebSocketSharp.Net.HttpListener does not have any URI prefixes to listen on.

> ## Remarks

> This method waits for an incoming request and returns the request information when received the request.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IgnoreWriteExceptions Property

> Documentation for this section has not yet been entered.

> ## Syntax

> public bool IgnoreWriteExceptions { get; set; }

> #### Value

> > Documentation for this section has not yet been entered.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsListening Property

> Gets a value indicating whether the WebSocketSharp.Net.HttpListener has been started.

> ## Syntax

> public bool IsListening { get; }

> #### Value

> > `true` if the WebSocketSharp.Net.HttpListener has been started; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsSupported Property

> Gets a value indicating whether the WebSocketSharp.Net.HttpListener can be used with the current operating system.

> ## Syntax

> public static bool IsSupported { get; }

> #### Value

> > `true`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Prefixes Property

> Gets the URI prefixes handled by the WebSocketSharp.Net.HttpListener.

> ## Syntax

> public HttpListenerPrefixCollection Prefixes { get; }

> #### Value

> > A WebSocketSharp.Net.HttpListenerPrefixCollection that contains the URI prefixes.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Realm Property

> Gets or sets the name of the realm associated with the WebSocketSharp.Net.HttpListener.

> ## Syntax

> public string Realm { get; set; }

> #### Value

> > A string that contains the name of the realm.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Start Method

> Starts to receive incoming requests.

> ## Syntax

> public void Start ()

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Stop Method

> Stops receiving incoming requests.

> ## Syntax

> public void Stop ()

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### System.IDisposable.Dispose Method

> Releases all resource used by the WebSocketSharp.Net.HttpListener.

> ## Syntax

> void System.IDisposable.Dispose ()

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### UnsafeConnectionNtlmAuthentication Property

> Documentation for this section has not yet been entered.

> ## Syntax

> public bool UnsafeConnectionNtlmAuthentication { get; set; }

> #### Value

> > Documentation for this section has not yet been entered.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)