Class WebSocketBase
WebSocket base properties/methods.
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class WebSocketBase : object
Properties
LastRoundTripTime
Gets or sets the last round trip time.
Declaration
public int LastRoundTripTime { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
RaiseCloseComplete(WebSocketCloseArgs, WebSocketStatusCode, String)
Raises the close complete callback.
Declaration
protected void RaiseCloseComplete(WebSocketCloseArgs closeArgs, WebSocketStatusCode statusCode, string reason)
Parameters
Type | Name | Description |
---|---|---|
WebSocketCloseArgs | closeArgs | The close arguments. |
WebSocketStatusCode | statusCode | The status code. |
System.String | reason | The reason. |
RaiseOnLatestRoundTripTime(Int32)
Raises the OnLatestRoundTripTime event.
Declaration
protected void RaiseOnLatestRoundTripTime(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value |
RaiseOpenFailure(WebSocketOpenArgs, WebSocketStatusCode, Exception)
Raises the open failure callback.
Declaration
protected void RaiseOpenFailure(WebSocketOpenArgs openArgs, WebSocketStatusCode statusCode, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
WebSocketOpenArgs | openArgs | The open arguments. |
WebSocketStatusCode | statusCode | The status code. |
Exception | exception | The exception. |
RaiseOpenSuccess(WebSocketOpenArgs)
Raises the open success callback.
Declaration
protected void RaiseOpenSuccess(WebSocketOpenArgs openArgs)
Parameters
Type | Name | Description |
---|---|---|
WebSocketOpenArgs | openArgs | The open arguments. |
RaiseReceive(WebSocketOpenArgs, String, Byte[])
Raises the receive callback.
Declaration
protected void RaiseReceive(WebSocketOpenArgs openArgs, string textMessage, byte[] binaryMessage)
Parameters
Type | Name | Description |
---|---|---|
WebSocketOpenArgs | openArgs | The open arguments. |
System.String | textMessage | The text message. |
System.Byte[] | binaryMessage | The binary message. |
RaiseStreamFailure(WebSocketOpenArgs, WebSocketStatusCode, Exception)
Raises the stream failure callback.
Declaration
protected void RaiseStreamFailure(WebSocketOpenArgs openArgs, WebSocketStatusCode statusCode, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
WebSocketOpenArgs | openArgs | The open arguments. |
WebSocketStatusCode | statusCode | The status code. |
Exception | exception | The exception. |
Events
OnLatestRoundTripTime
Raised when the latest round trip time is calculated.
Declaration
public event Action1<int> OnLatestRoundTripTime
Event Type
Type | Description |
---|---|
Action1<System.Int32> |