/ fm / liveswitch / WebSocket
Class: WebSocket
fm.liveswitch.WebSocket
Hierarchy
-
↳ WebSocket
Implements
Table of contents
Constructors
Properties
- _aborting
- _closing
- _keepAliveInterval
- _keepAliveTimeoutId
- _onRequestCreated
- _onResponseReceived
- _openArgs
- _opening
- _protocol
- _raisedOpenFailure
- _raisedStreamFailure
- _requestUrl
- _sendArgs
- _timer
- _webSocket
- _disableBinary
Methods
- close
- getBufferedAmount
- getIsOpen
- getSecure
- getTypeString
- onClose
- onError
- onMessage
- onOpen
- open
- processOnClose
- raiseCloseComplete
- raiseOnRequestCreated
- raiseOnResponseReceived
- raiseOpenFailure
- raiseOpenSuccess
- raiseReceive
- raiseStreamFailure
- send
- startKeepAlive
- stopKeepAlive
- 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:38
Properties
_aborting
• Private
_aborting: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:16
_closing
• Private
_closing: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:15
_keepAliveInterval
• Private
_keepAliveInterval: number
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:22
_keepAliveTimeoutId
• Private
_keepAliveTimeoutId: number= null
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:23
_onRequestCreated
• Private
_onRequestCreated: IAction1<HttpRequestCreatedArgs>
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:12
_onResponseReceived
• Private
_onResponseReceived: IAction1<HttpResponseReceivedArgs>
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:13
_openArgs
• Private
_openArgs: WebSocketOpenArgs
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:17
_opening
• Private
_opening: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:14
_protocol
• Private
_protocol: string
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:11
_raisedOpenFailure
• Private
_raisedOpenFailure: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:21
_raisedStreamFailure
• Private
_raisedStreamFailure: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:20
_requestUrl
• Private
_requestUrl: string
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:9
_sendArgs
• Private
_sendArgs: WebSocketSendArgs
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:18
_timer
• Private
_timer: number
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:19
_webSocket
• Private
_webSocket: any
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:10
_disableBinary
▪ Private
Static
_disableBinary: boolean= false
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:8
Methods
close
▸ close(): void
Returns: void
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:235
▸ close(args
: WebSocketCloseArgs): void
Parameters:
Name | Type |
---|---|
args |
WebSocketCloseArgs |
Returns: void
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:236
getBufferedAmount
▸ getBufferedAmount(): number
Returns: number
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:58
getIsOpen
▸ getIsOpen(): boolean
Returns: boolean
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:64
getSecure
▸ getSecure(): boolean
Returns: boolean
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:36
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:136
onError
▸ Private
onError(e
: Event): any
Parameters:
Name | Type |
---|---|
e |
Event |
Returns: any
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:123
onMessage
▸ Private
onMessage(e
: MessageEvent<any>): any
Parameters:
Name | Type |
---|---|
e |
MessageEvent<any> |
Returns: any
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:192
onOpen
▸ Private
onOpen(e
: Event): any
Parameters:
Name | Type |
---|---|
e |
Event |
Returns: any
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:115
open
▸ open(args
: WebSocketOpenArgs): void
Parameters:
Name | Type |
---|---|
args |
WebSocketOpenArgs |
Returns: void
Implementation of: IWebSocket
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:70
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:170
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:258
raiseOnResponseReceived
▸ Private
raiseOnResponseReceived(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:266
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:214
startKeepAlive
▸ Private
startKeepAlive(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:141
stopKeepAlive
▸ Private
stopKeepAlive(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:163
getDisableBinary
▸ Static
getDisableBinary(): boolean
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:30
getExists
▸ Static
getExists(): boolean
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:24
setDisableBinary
▸ Static
setDisableBinary(disableBinary
: boolean): void
Parameters:
Name | Type |
---|---|
disableBinary |
boolean |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocket.ts:27