/ fm / liveswitch / WebSocket
Class: WebSocket
fm.liveswitch.WebSocket
Hierarchy
-
↳ WebSocket
Implements
Table of contents
Constructors
Properties
- _aborting
- _closing
- _keepAliveInterval
- _keepAliveTimeoutId
- _lastRoundTripTime
- _onRequestCreated
- _onResponseReceived
- _openArgs
- _opening
- _pingSendTimes
- _protocol
- _raisedOpenFailure
- _raisedStreamFailure
- _requestUrl
- _sendArgs
- _timer
- _webSocket
- _disableBinary
Methods
- close
- doCloseWebSocket
- getBufferedAmount
- getIsClosingOrClosed
- getIsOpen
- getLastRoundTripTime
- getSecure
- getTypeString
- onClose
- onError
- onMessage
- onOpen
- open
- processOnClose
- processPong
- raiseCloseComplete
- raiseOnRequestCreated
- raiseOnResponseReceived
- raiseOpenFailure
- raiseOpenSuccess
- raiseReceive
- raiseStreamFailure
- send
- sendAndTrackPing
- startKeepAlive
- stopKeepAlive
- tryCloseWebSocket
- getDisableBinary
- getExists
- setDisableBinary
Constructors
constructor
+ new WebSocket(requestUrl
: string, protocol?
: string): WebSocket
Parameters:
Name | Type |
---|---|
requestUrl |
string |
protocol? |
string |
Returns: WebSocket
Inherited from: WebSocketBase
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:45
Properties
_aborting
• Private
_aborting: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:17
_closing
• Private
_closing: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:16
_keepAliveInterval
• Private
_keepAliveInterval: number
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:23
_keepAliveTimeoutId
• Private
_keepAliveTimeoutId: number= null
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:24
_lastRoundTripTime
• Private
_lastRoundTripTime: number= -1
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:26
_onRequestCreated
• Private
_onRequestCreated: IAction1<HttpRequestCreatedArgs>
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:13
_onResponseReceived
• Private
_onResponseReceived: IAction1<HttpResponseReceivedArgs>
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:14
_openArgs
• Private
_openArgs: WebSocketOpenArgs
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:18
_opening
• Private
_opening: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:15
_pingSendTimes
• Private
_pingSendTimes: object
Type declaration:
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:25
_protocol
• Private
_protocol: string
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:12
_raisedOpenFailure
• Private
_raisedOpenFailure: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:22
_raisedStreamFailure
• Private
_raisedStreamFailure: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:21
_requestUrl
• Private
_requestUrl: string
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:10
_sendArgs
• Private
_sendArgs: WebSocketSendArgs
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:19
_timer
• Private
_timer: number
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:20
_webSocket
• Private
_webSocket: any
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:11
_disableBinary
▪ Private
Static
_disableBinary: boolean= false
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:9
Methods
close
▸ close(): void
Returns: void
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:311
▸ close(args
: WebSocketCloseArgs): void
Parameters:
Name | Type |
---|---|
args |
WebSocketCloseArgs |
Returns: void
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:312
doCloseWebSocket
▸ Private
doCloseWebSocket(abort
: boolean, code
: number, reason
: string): void
Parameters:
Name | Type |
---|---|
abort |
boolean |
code |
number |
reason |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:192
getBufferedAmount
▸ getBufferedAmount(): number
Returns: number
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:67
getIsClosingOrClosed
▸ Private
getIsClosingOrClosed(): boolean
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:81
getIsOpen
▸ getIsOpen(): boolean
Returns: boolean
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:74
getLastRoundTripTime
▸ getLastRoundTripTime(): number
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:165
getSecure
▸ getSecure(): boolean
Returns: boolean
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:43
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: WebSocketBase
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:5
onClose
▸ Private
onClose(e
: CloseEvent): any
Parameters:
Name | Type |
---|---|
e |
CloseEvent |
Returns: any
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:159
onError
▸ Private
onError(e
: Event): any
Parameters:
Name | Type |
---|---|
e |
Event |
Returns: any
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:145
onMessage
▸ Private
onMessage(e
: MessageEvent<any>): any
Parameters:
Name | Type |
---|---|
e |
MessageEvent<any> |
Returns: any
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:265
onOpen
▸ Private
onOpen(e
: Event): any
Parameters:
Name | Type |
---|---|
e |
Event |
Returns: any
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:136
open
▸ open(args
: WebSocketOpenArgs): void
Parameters:
Name | Type |
---|---|
args |
WebSocketOpenArgs |
Returns: void
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:90
processOnClose
▸ Private
processOnClose(code
: number, reason
: string): void
Parameters:
Name | Type |
---|---|
code |
number |
reason |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:242
processPong
▸ Private
processPong(message
: string): void
Parameters:
Name | Type |
---|---|
message |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:213
raiseCloseComplete
▸ Protected
raiseCloseComplete(closeArgs
: WebSocketCloseArgs, statusCode
: WebSocketStatusCode, reason
: string): void
Raises the close complete callback.
Parameters:
Name | Type | Description |
---|---|---|
closeArgs |
WebSocketCloseArgs | The close arguments. |
statusCode |
WebSocketStatusCode | The status code. |
reason |
string | The reason. |
Returns: void
Inherited from: WebSocketBase
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketBase.ts:35
raiseOnRequestCreated
▸ Private
raiseOnRequestCreated(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:330
raiseOnResponseReceived
▸ Private
raiseOnResponseReceived(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:339
raiseOpenFailure
▸ Protected
raiseOpenFailure(openArgs
: WebSocketOpenArgs, statusCode
: WebSocketStatusCode, exception
: Exception): void
Raises the open failure callback.
Parameters:
Name | Type | Description |
---|---|---|
openArgs |
WebSocketOpenArgs | The open arguments. |
statusCode |
WebSocketStatusCode | The status code. |
exception |
Exception | The exception. |
Returns: void
Inherited from: WebSocketBase
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketBase.ts:56
raiseOpenSuccess
▸ Protected
raiseOpenSuccess(openArgs
: WebSocketOpenArgs): void
Raises the open success callback.
Parameters:
Name | Type | Description |
---|---|---|
openArgs |
WebSocketOpenArgs | The open arguments. |
Returns: void
Inherited from: WebSocketBase
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketBase.ts:75
raiseReceive
▸ Protected
raiseReceive(openArgs
: WebSocketOpenArgs, textMessage
: string, binaryMessage
: Uint8Array): void
Raises the receive callback.
Parameters:
Name | Type | Description |
---|---|---|
openArgs |
WebSocketOpenArgs | The open arguments. |
textMessage |
string | The text message. |
binaryMessage |
Uint8Array | The binary message. |
Returns: void
Inherited from: WebSocketBase
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketBase.ts:94
raiseStreamFailure
▸ Protected
raiseStreamFailure(openArgs
: WebSocketOpenArgs, statusCode
: WebSocketStatusCode, exception
: Exception): void
Raises the stream failure callback.
Parameters:
Name | Type | Description |
---|---|---|
openArgs |
WebSocketOpenArgs | The open arguments. |
statusCode |
WebSocketStatusCode | The status code. |
exception |
Exception | The exception. |
Returns: void
Inherited from: WebSocketBase
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketBase.ts:115
send
▸ send(args
: WebSocketSendArgs): void
Parameters:
Name | Type |
---|---|
args |
WebSocketSendArgs |
Returns: void
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:289
sendAndTrackPing
▸ Private
sendAndTrackPing(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:203
startKeepAlive
▸ Private
startKeepAlive(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:169
stopKeepAlive
▸ Private
stopKeepAlive(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:230
tryCloseWebSocket
▸ Private
tryCloseWebSocket(abort
: boolean, code
: number, reason
: string): void
Parameters:
Name | Type |
---|---|
abort |
boolean |
code |
number |
reason |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:185
getDisableBinary
▸ Static
getDisableBinary(): boolean
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:36
getExists
▸ Static
getExists(): boolean
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:28
setDisableBinary
▸ Static
setDisableBinary(disableBinary
: boolean): void
Parameters:
Name | Type |
---|---|
disableBinary |
boolean |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:32