WebSocketContext Class
.NET Framework 4.5
Used for accessing the information in the WebSocket handshake.
System.Object
System.Net.WebSockets.WebSocketContext
System.Net.WebSockets.HttpListenerWebSocketContext
System.Web.WebSockets.AspNetWebSocketContext
System.Net.WebSockets.WebSocketContext
System.Net.WebSockets.HttpListenerWebSocketContext
System.Web.WebSockets.AspNetWebSocketContext
Namespace: System.Net.WebSockets
Assembly: System (in System.dll)
The WebSocketContext type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | CookieCollection | The cookies that were passed to the server during the opening handshake. |
![]() | Headers | The HTTP headers that were sent to the server during the opening handshake. |
![]() | IsAuthenticated | Whether the WebSocket client is authenticated. |
![]() | IsLocal | Whether the WebSocket client connected from the local machine. |
![]() | IsSecureConnection | Whether the WebSocket connection is secured using Secure Sockets Layer (SSL). |
![]() | Origin | The value of the Origin HTTP header included in the opening handshake. |
![]() | RequestUri | The URI requested by the WebSocket client. |
![]() | SecWebSocketKey | The value of the SecWebSocketKey HTTP header included in the opening handshake. |
![]() | SecWebSocketProtocols | The value of the SecWebSocketKey HTTP header included in the opening handshake. |
![]() | SecWebSocketVersion | The list of subprotocols requested by the WebSocket client. |
![]() | User | An object used to obtain identity, authentication information, and security roles for the WebSocket client. |
![]() | WebSocket | The WebSocket instance used to interact (send/receive/close/etc) with the WebSocket connection. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


