/ fm / liveswitch / PluginDataChannel
Class: PluginDataChannel
fm.liveswitch.PluginDataChannel
Hierarchy
-
↳ PluginDataChannel
Implements
Table of contents
Constructors
Properties
Methods
- addOnStateChange
- getDynamicProperties
- getDynamicValue
- getHandle
- getId
- getInfo
- getIsInternal
- getLabel
- getOnReceive
- getOrdered
- getState
- getSubprotocol
- getTypeString
- removeOnStateChange
- sendDataBytes
- sendDataString
- setDynamicValue
- setGetRemoteConnectionInfo
- setOnReceive
- unsetDynamicValue
Constructors
constructor
+ new PluginDataChannel(external
: IExternalDataChannel, label
: string, ordered?
: boolean, subprotocol?
: string): PluginDataChannel
Parameters:
Name | Type |
---|---|
external |
IExternalDataChannel |
label |
string |
ordered? |
boolean |
subprotocol? |
string |
Returns: PluginDataChannel
Inherited from: Dynamic
Defined in: Tools/BuildAPIDocs/Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:34
Properties
_getRemoteConnectionInfo
• Private
_getRemoteConnectionInfo: IFunction1<string, any>= null
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:75
_state
• Private
_state: DataChannelState
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:34
Methods
addOnStateChange
▸ addOnStateChange(value
: IAction1<PluginDataChannel>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<PluginDataChannel> |
Returns: void
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:85
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:58
getHandle
▸ getHandle(): number
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:25
getId
▸ getId(): string
Returns: string
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:100
getInfo
▸ getInfo(): DataChannelInfo
Returns: DataChannelInfo
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:81
getIsInternal
▸ getIsInternal(): boolean
Returns: boolean
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:97
getLabel
▸ getLabel(): string
Returns: string
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:88
getOnReceive
▸ getOnReceive(): IAction1<DataChannelReceiveArgs>
Returns: IAction1<DataChannelReceiveArgs>
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:91
getOrdered
▸ getOrdered(): boolean
Returns: boolean
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:94
getState
▸ getState(): DataChannelState
Returns: DataChannelState
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:103
getSubprotocol
▸ getSubprotocol(): string
Returns: string
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:106
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: Dynamic
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:7
removeOnStateChange
▸ removeOnStateChange(value
: IAction1<PluginDataChannel>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<PluginDataChannel> |
Returns: void
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:109
sendDataBytes
▸ sendDataBytes(dataBytes
: DataBuffer): Future<Object>
Parameters:
Name | Type |
---|---|
dataBytes |
DataBuffer |
Returns: Future<Object>
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:112
sendDataString
▸ sendDataString(dataString
: string): Future<Object>
Parameters:
Name | Type |
---|---|
dataString |
string |
Returns: Future<Object>
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:118
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:95
setGetRemoteConnectionInfo
▸ setGetRemoteConnectionInfo(value
: IFunction1<string, any>): void
Parameters:
Name | Type |
---|---|
value |
IFunction1<string, any> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.ts:77
setOnReceive
▸ setOnReceive(value
: IAction1<DataChannelReceiveArgs>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<DataChannelReceiveArgs> |
Returns: void
Implementation of: IInternalDataChannel
Defined in: Generated/TypeScript/fm.liveswitch/PluginDataChannel.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:122