/ fm / liveswitch / WebSocketTransfer
Class: WebSocketTransfer
fm.liveswitch.WebSocketTransfer
Base class that defines methods for transferring content over the WebSocket protocol.
Hierarchy
WebSocketTransfer
Table of contents
Constructors
Methods
- fmliveswitchWebSocketTransferInit
- getHandshakeTimeout
- getOnOpenFailure
- getOnOpenSuccess
- getOnRequestCreated
- getOnResponseReceived
- getOnStreamFailure
- getSender
- getStreamTimeout
- getTypeString
- getUrl
- open
- send
- sendAsync
- setHandshakeTimeout
- setOnOpenFailure
- setOnOpenSuccess
- setOnRequestCreated
- setOnResponseReceived
- setOnStreamFailure
- setSender
- setStreamTimeout
- setUrl
- shutdown
Constructors
constructor
+ new WebSocketTransfer(url
: string): WebSocketTransfer
Initializes a new instance of the [[fm.liveswitch.webSocketTransfer]] class.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL. |
Returns: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:35
Methods
fmliveswitchWebSocketTransferInit
▸ Private
fmliveswitchWebSocketTransferInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:31
getHandshakeTimeout
▸ getHandshakeTimeout(): number
Gets the timeout for the initial handshake (in ms).
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:61
getOnOpenFailure
▸ getOnOpenFailure(): IAction1<WebSocketOpenFailureArgs>
Gets the callback to invoke if the handshake fails.
Returns: IAction1<WebSocketOpenFailureArgs>
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:73
getOnOpenSuccess
▸ getOnOpenSuccess(): IAction1<WebSocketOpenSuccessArgs>
Gets the callback to invoke if the handshake succeeds.
Returns: IAction1<WebSocketOpenSuccessArgs>
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:85
getOnRequestCreated
▸ getOnRequestCreated(): IAction1<HttpRequestCreatedArgs>
Gets the callback to invoke when the handshake request is created.
Returns: IAction1<HttpRequestCreatedArgs>
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:97
getOnResponseReceived
▸ getOnResponseReceived(): IAction1<HttpResponseReceivedArgs>
Gets the callback to invoke when the handshake response is received.
Returns: IAction1<HttpResponseReceivedArgs>
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:109
getOnStreamFailure
▸ getOnStreamFailure(): IAction1<WebSocketStreamFailureArgs>
Gets the callback to invoke if the stream errors out.
Returns: IAction1<WebSocketStreamFailureArgs>
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:121
getSender
▸ getSender(): Object
Gets the sender of the messages.
Returns: Object
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:133
getStreamTimeout
▸ getStreamTimeout(): number
Gets the timeout for the stream (in ms).
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:145
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:9
getUrl
▸ getUrl(): string
Gets the URL.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:157
open
▸ Abstract
open(headers
: NameValueCollection): void
Opens the socket.
Parameters:
Name | Type | Description |
---|---|---|
headers |
NameValueCollection | The headers to pass in with the initial handshake. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:170
send
▸ Abstract
send(requestArgs
: HttpRequestArgs): HttpResponseArgs
Sends a request synchronously.
Parameters:
Name | Type | Description |
---|---|---|
requestArgs |
HttpRequestArgs | The request parameters. |
Returns: HttpResponseArgs
The response parameters.
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:178
sendAsync
▸ Abstract
sendAsync(requestArgs
: HttpRequestArgs, callback
: IAction1<HttpResponseArgs>): void
Sends a request asynchronously.
Parameters:
Name | Type | Description |
---|---|---|
requestArgs |
HttpRequestArgs | The request parameters. |
callback |
IAction1<HttpResponseArgs> | The callback to execute with the resulting response. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:186
setHandshakeTimeout
▸ setHandshakeTimeout(value
: number): void
Sets the timeout for the initial handshake (in ms).
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:192
setOnOpenFailure
▸ setOnOpenFailure(value
: IAction1<WebSocketOpenFailureArgs>): void
Sets the callback to invoke if the handshake fails.
Parameters:
Name | Type |
---|---|
value |
IAction1<WebSocketOpenFailureArgs> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:205
setOnOpenSuccess
▸ setOnOpenSuccess(value
: IAction1<WebSocketOpenSuccessArgs>): void
Sets the callback to invoke if the handshake succeeds.
Parameters:
Name | Type |
---|---|
value |
IAction1<WebSocketOpenSuccessArgs> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:217
setOnRequestCreated
▸ setOnRequestCreated(value
: IAction1<HttpRequestCreatedArgs>): void
Sets the callback to invoke when the handshake request is created.
Parameters:
Name | Type |
---|---|
value |
IAction1<HttpRequestCreatedArgs> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:229
setOnResponseReceived
▸ setOnResponseReceived(value
: IAction1<HttpResponseReceivedArgs>): void
Sets the callback to invoke when the handshake response is received.
Parameters:
Name | Type |
---|---|
value |
IAction1<HttpResponseReceivedArgs> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:241
setOnStreamFailure
▸ setOnStreamFailure(value
: IAction1<WebSocketStreamFailureArgs>): void
Sets the callback to invoke if the stream errors out.
Parameters:
Name | Type |
---|---|
value |
IAction1<WebSocketStreamFailureArgs> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:253
setSender
▸ setSender(value
: Object): void
Sets the sender of the messages.
Parameters:
Name | Type |
---|---|
value |
Object |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:265
setStreamTimeout
▸ setStreamTimeout(value
: number): void
Sets the timeout for the stream (in ms).
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:277
setUrl
▸ setUrl(value
: string): void
Sets the URL.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:290
shutdown
▸ Abstract
shutdown(): void
Releases any resources and shuts down.
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:304