/ fm / liveswitch / WebSocketReceiveArgs
Class: WebSocketReceiveArgs
fm.liveswitch.WebSocketReceiveArgs
Arguments for [[fm.liveswitch.webSocketOpenArgs.onReceive]].
Hierarchy
-
↳ WebSocketReceiveArgs
Table of contents
Constructors
Methods
- getBinaryMessage
- getByteCount
- getDynamicProperties
- getDynamicValue
- getIsText
- getOpenArgs
- getTextMessage
- getTypeString
- setBinaryMessage
- setDynamicValue
- setOpenArgs
- setTextMessage
- unsetDynamicValue
Constructors
constructor
+ new WebSocketReceiveArgs(): WebSocketReceiveArgs
Returns: WebSocketReceiveArgs
Inherited from: Dynamic
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:18
Methods
getBinaryMessage
▸ getBinaryMessage(): Uint8Array
Gets the message received from the server as binary data.
Returns: Uint8Array
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:36
getByteCount
▸ getByteCount(): number
Gets the byte count of the message.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:48
getDynamicProperties
▸ getDynamicProperties(): Hash<string, Object>
Gets all dynamic properties on this instance.
Returns: Hash<string, Object>
Inherited from: Dynamic
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:37
getDynamicValue
▸ getDynamicValue(key
: string): Object
Gets a property value from the local cache.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
Returns: Object
The stored value, if found; otherwise null.
Inherited from: Dynamic
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:61
getIsText
▸ getIsText(): boolean
Gets whether or not the received message is text.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:63
getOpenArgs
▸ getOpenArgs(): WebSocketOpenArgs
Gets the original arguments passed to the open method.
Returns: WebSocketOpenArgs
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:75
getTextMessage
▸ getTextMessage(): string
Gets the message received from the server as text data.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:87
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: Dynamic
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:10
setBinaryMessage
▸ setBinaryMessage(value
: Uint8Array): void
Sets the message received from the server as binary data.
Parameters:
Name | Type |
---|---|
value |
Uint8Array |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:99
setDynamicValue
▸ setDynamicValue(key
: string, value
: Object): void
Sets a property value in the local cache.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
value |
Object | The property value. This can be any object that needs to be stored for future use. |
Returns: void
Inherited from: Dynamic
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:98
setOpenArgs
▸ setOpenArgs(value
: WebSocketOpenArgs): void
Sets the original arguments passed to the open method.
Parameters:
Name | Type |
---|---|
value |
WebSocketOpenArgs |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:111
setTextMessage
▸ setTextMessage(value
: string): void
Sets the message received from the server as text data.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WebSocketReceiveArgs.ts:123
unsetDynamicValue
▸ unsetDynamicValue(key
: string): boolean
Removes a property value from the local cache. Returns true if the value was removed and returns false otherwise.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
Returns: boolean
true
if the value was removed; otherwise, false
.
Inherited from: Dynamic
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:125