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
Context
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 |
Protocol
Gets the WebSocket subprotocol used in the session.
Declaration
string Protocol { get; }
Property Value
Type | Description |
---|---|
System.String |
A |
StartTime
Gets the time that the session has started.
Declaration
DateTime StartTime { get; }
Property Value
Type | Description |
---|---|
DateTime |
A |
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. |