Class WebSocketServiceHost
Exposes the methods and properties used to access the information in
a WebSocket service provided by the WebSocketServer or
.
Inheritance
System.Object
WebSocketServiceHost
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common.Socket.Server
Assembly: Mars.Common.dll
Syntax
public abstract class WebSocketServiceHost
Remarks
This class is an abstract class.
Constructors
| Improve this Doc View SourceWebSocketServiceHost(String)
Declaration
protected WebSocketServiceHost(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | A System.String that represents the absolute path to the service. |
Remarks
This class is an abstract class.
Properties
| Improve this Doc View SourceBehaviorType
Gets the System.Type of the behavior of the service.
Declaration
public abstract Type BehaviorType { get; }
Property Value
Type | Description |
---|---|
System.Type | A System.Type that represents the type of the behavior of the service. |
Remarks
This class is an abstract class.
|
Improve this Doc
View Source
KeepClean
Gets or sets a value indicating whether the service cleans up
the inactive sessions periodically.
Declaration
public bool KeepClean { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
true if the service cleans up the inactive sessions every
60 seconds; otherwise, false .
|
Remarks
The set operation does nothing if the service has already started or
it is shutting down.
|
Improve this Doc
View Source
Path
Gets the path to the service.
Declaration
public string Path { get; }
Property Value
Type | Description |
---|---|
System.String | A System.String that represents the absolute path to the service. |
Remarks
This class is an abstract class.
|
Improve this Doc
View Source
Sessions
Gets the management function for the sessions in the service.
Declaration
public WebSocketSessionManager Sessions { get; }
Property Value
Type | Description |
---|---|
WebSocketSessionManager | A WebSocketSessionManager that manages the sessions in the service. |
Remarks
This class is an abstract class.
|
Improve this Doc
View Source
WaitTime
Gets or sets the time to wait for the response to the WebSocket Ping or
Close.
Declaration
public TimeSpan WaitTime { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | A System.TimeSpan to wait for the response. |
Remarks
The set operation does nothing if the service has already started or
it is shutting down.
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The value specified for a set operation is zero or less. |
Methods
| Improve this Doc View SourceCreateSession()
Creates a new session for the service.
Declaration
protected abstract WebSocketBehavior CreateSession()
Returns
Type | Description |
---|---|
WebSocketBehavior | A WebSocketBehavior instance that represents the new session. |
Remarks
This class is an abstract class.