Interface IWebSocketSession
Exposes the properties used to access the information in a session in a WebSocket service.
Namespace: Mars.Common.Socket.Server
Assembly: Mars.Common.dll
Syntax
public interface IWebSocketSession
Properties
| Improve this Doc View SourceContext
Gets the information in the connection request to the WebSocket service.
Declaration
WebSocketContext Context { get; }
Property Value
Type | Description |
---|---|
WebSocketContext | A WebSocketContext that provides the access to the connection request. |
ID
Gets the unique ID of the session.
Declaration
string ID { get; }
Property Value
Type | Description |
---|---|
System.String | A System.String that represents the unique ID of the session. |
Protocol
Gets the WebSocket subprotocol used in the session.
Declaration
string Protocol { get; }
Property Value
Type | Description |
---|---|
System.String | A System.String that represents the subprotocol if any. |
StartTime
Gets the time that the session has started.
Declaration
DateTime StartTime { get; }
Property Value
Type | Description |
---|---|
System.DateTime | A System.DateTime that represents the time that the session has started. |
State
Gets the state of the WebSocket used in the session.
Declaration
WebSocketState State { get; }
Property Value
Type | Description |
---|---|
WebSocketState | One of the WebSocketState enum values, indicates the state of the WebSocket used in the session. |