WebSocketContext Class
Used for accessing the information in the WebSocket handshake.
Assembly: System (in System.dll)
System.Net.WebSockets::WebSocketContext
System.Net.WebSockets::HttpListenerWebSocketContext
System.Web.WebSockets::AspNetWebSocketContext
| Name | Description | |
|---|---|---|
![]() | WebSocketContext() | Creates an instance of the WebSocketContext class. |
| 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 the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
Available since 4.5
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


