websocket-sharp : WebSocketSharp.Net Namespace

# HttpListenerContext Class

Provides access to the HTTP request and response objects used by the WebSocketSharp.Net.HttpListener class.

## Syntax

public sealed class HttpListenerContext

## Remarks

The HttpListenerContext class cannot be inherited.

## Requirements

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

## Members

See Also: Inherited members from object.

## Public Properties

[read-only] | Request | HttpListenerRequest . Gets the WebSocketSharp.Net.HttpListenerRequest that contains the HTTP request from a client.
[read-only] | Response | HttpListenerResponse . Gets the WebSocketSharp.Net.HttpListenerResponse that contains the HTTP response to send to the client in response to the client's request.
[read-only] | User | System.Security.Principal.IPrincipal . Gets the client information (identity, authentication information and security roles).

## Public Methods

AcceptWebSocket () : WebSocketSharp.Net.WebSockets.HttpListenerWebSocketContext

> Accepts a WebSocket connection 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

### AcceptWebSocket Method

> Accepts a WebSocket connection by the WebSocketSharp.Net.HttpListener.

> ## Syntax

> public WebSocketSharp.Net.WebSockets.HttpListenerWebSocketContext AcceptWebSocket ()

> #### Returns

> > A WebSocketSharp.Net.WebSockets.HttpListenerWebSocketContext that contains a WebSocket connection.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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

### Request Property

> Gets the WebSocketSharp.Net.HttpListenerRequest that contains the HTTP request from a client.

> ## Syntax

> public HttpListenerRequest Request { get; }

> #### Value

> > A WebSocketSharp.Net.HttpListenerRequest that contains the HTTP request objects.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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

### Response Property

> Gets the WebSocketSharp.Net.HttpListenerResponse that contains the HTTP response to send to the client in response to the client's request.

> ## Syntax

> public HttpListenerResponse Response { get; }

> #### Value

> > A WebSocketSharp.Net.HttpListenerResponse that contains the HTTP response objects.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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

### User Property

> Gets the client information (identity, authentication information and security roles).

> ## Syntax

> public System.Security.Principal.IPrincipal User { get; }

> #### Value

> > A System.Security.Principal.IPrincipal contains the client information.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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