/ fm / liveswitch / WebSocketWebRequestTransfer
Class: WebSocketWebRequestTransfer
fm.liveswitch.WebSocketWebRequestTransfer
Defines methods for transferring messages using the WebSocket protocol.
Hierarchy
-
↳ WebSocketWebRequestTransfer
Table of contents
Constructors
Methods
- 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 WebSocketWebRequestTransfer(url
: string): WebSocketWebRequestTransfer
Creates a new instance of [[fm.liveswitch.webSocketWebRequestTransfer]].
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL. |
Returns: WebSocketWebRequestTransfer
Inherited from: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketWebRequestTransfer.ts:16
Methods
getHandshakeTimeout
▸ getHandshakeTimeout(): number
Gets the timeout for the initial handshake (in ms).
Returns: number
Inherited from: WebSocketTransfer
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>
Inherited from: WebSocketTransfer
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>
Inherited from: WebSocketTransfer
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>
Inherited from: WebSocketTransfer
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>
Inherited from: WebSocketTransfer
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>
Inherited from: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:121
getSender
▸ getSender(): Object
Gets the sender of the messages.
Returns: Object
Inherited from: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:133
getStreamTimeout
▸ getStreamTimeout(): number
Gets the timeout for the stream (in ms).
Returns: number
Inherited from: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:145
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketWebRequestTransfer.ts:10
getUrl
▸ getUrl(): string
Gets the URL.
Returns: string
Inherited from: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:157
open
▸ open(headers
: NameValueCollection): void
Opens the WebSocket connection.
Parameters:
Name | Type |
---|---|
headers |
NameValueCollection |
Returns: void
Overrides: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketWebRequestTransfer.ts:69
send
▸ send(requestArgs
: HttpRequestArgs): HttpResponseArgs
Sends a request synchronously.
Parameters:
Name | Type | Description |
---|---|---|
requestArgs |
HttpRequestArgs | The request parameters. |
Returns: HttpResponseArgs
The response parameters.
Overrides: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketWebRequestTransfer.ts:114
sendAsync
▸ 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
Overrides: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketWebRequestTransfer.ts:128
setHandshakeTimeout
▸ setHandshakeTimeout(value
: number): void
Sets the timeout for the initial handshake (in ms).
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Inherited from: WebSocketTransfer
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
Inherited from: WebSocketTransfer
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
Inherited from: WebSocketTransfer
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
Inherited from: WebSocketTransfer
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
Inherited from: WebSocketTransfer
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
Inherited from: WebSocketTransfer
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
Inherited from: WebSocketTransfer
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
Inherited from: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:277
setUrl
▸ setUrl(value
: string): void
Sets the URL.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Inherited from: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketTransfer.ts:290
shutdown
▸ shutdown(): void
Releases any resources and shuts down.
Returns: void
Overrides: WebSocketTransfer
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketWebRequestTransfer.ts:166