Search Results for

    / fm / liveswitch / DataChannel

    Class: DataChannel

    fm.liveswitch.DataChannel

    Hierarchy

    • Dynamic

      ↳ DataChannel

    Implements

    • IDataChannel<DataChannel>
    • IExternalDataChannel

    Table of contents

    Constructors

    • constructor

    Methods

    • addOnStateChange
    • getDynamicProperties
    • getDynamicValue
    • getId
    • getInfo
    • getIsInternal
    • getLabel
    • getOnReceive
    • getOrdered
    • getState
    • getSubprotocol
    • getTypeString
    • removeOnStateChange
    • sendDataBytes
    • sendDataString
    • setDynamicValue
    • setOnReceive
    • unsetDynamicValue

    Constructors

    constructor

    + new DataChannel(label: string, ordered?: boolean, subprotocol?: string): DataChannel

    Parameters:

    Name Type
    label string
    ordered? boolean
    subprotocol? string

    Returns: DataChannel

    Inherited from: Dynamic

    Defined in: Tools/BuildAPIDocs/Generated/TypeScript/fm.liveswitch/DataChannel.ts:27

    Methods

    addOnStateChange

    ▸ addOnStateChange(value: IAction1<DataChannel>): void

    Parameters:

    Name Type
    value IAction1<DataChannel>

    Returns: void

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:105


    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


    getId

    ▸ getId(): string

    Returns: string

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:97


    getInfo

    ▸ getInfo(): DataChannelInfo

    Returns: DataChannelInfo

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:19


    getIsInternal

    ▸ getIsInternal(): boolean

    Returns: boolean

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:15


    getLabel

    ▸ getLabel(): string

    Returns: string

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:93


    getOnReceive

    ▸ getOnReceive(): IAction1<DataChannelReceiveArgs>

    Returns: IAction1<DataChannelReceiveArgs>

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:77


    getOrdered

    ▸ getOrdered(): boolean

    Returns: boolean

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:101


    getState

    ▸ getState(): DataChannelState

    Returns: DataChannelState

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:89


    getSubprotocol

    ▸ getSubprotocol(): string

    Returns: string

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:73


    getTypeString

    ▸ getTypeString(): string

    Returns: string

    Overrides: Dynamic

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:4


    removeOnStateChange

    ▸ removeOnStateChange(value: IAction1<DataChannel>): void

    Parameters:

    Name Type
    value IAction1<DataChannel>

    Returns: void

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:109


    sendDataBytes

    ▸ sendDataBytes(dataBytes: DataBuffer): Future<Object>

    Parameters:

    Name Type
    dataBytes DataBuffer

    Returns: Future<Object>

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:85


    sendDataString

    ▸ sendDataString(dataString: string): Future<Object>

    Parameters:

    Name Type
    dataString string

    Returns: Future<Object>

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:81


    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


    setOnReceive

    ▸ setOnReceive(value: IAction1<DataChannelReceiveArgs>): void

    Parameters:

    Name Type
    value IAction1<DataChannelReceiveArgs>

    Returns: void

    Implementation of: IExternalDataChannel

    Defined in: Generated/TypeScript/fm.liveswitch/DataChannel.ts:69


    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

    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.15.0