Search Results for

    / fm / liveswitch / WebRtcDataChannel

    Class: WebRtcDataChannel

    fm.liveswitch.WebRtcDataChannel

    Hierarchy

    • WebRtcDataChannelBase<WebRtcDataChannel>

      ↳ WebRtcDataChannel

    Implements

    • IInternalDataChannel

    Table of contents

    Constructors

    • constructor

    Methods

    • addOnStateChange
    • getBytesReceived
    • getBytesSent
    • getConnectionId
    • getDynamicProperties
    • getDynamicValue
    • getId
    • getInfo
    • getInstance
    • getIsInternal
    • getIsTerminated
    • getIsTerminating
    • getIsTerminatingOrTerminated
    • getLabel
    • getMessagesReceived
    • getMessagesSent
    • getNativeDataChannel
    • getOnReceive
    • getOrdered
    • getState
    • getStreamId
    • getSubprotocol
    • getTypeString
    • processStateChange
    • processStateLockChange
    • raiseDataBytes
    • raiseDataString
    • registerDataReceived
    • registerDataSent
    • removeOnStateChange
    • sendDataBytes
    • sendDataString
    • setDynamicValue
    • setNativeDataChannel
    • setOnReceive
    • unsetDynamicValue

    Constructors

    constructor

    + new WebRtcDataChannel(external: IExternalDataChannel, label: string, ordered?: boolean, subprotocol?: string): WebRtcDataChannel

    Parameters:

    Name Type
    external IExternalDataChannel
    label string
    ordered? boolean
    subprotocol? string

    Returns: WebRtcDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Tools/BuildAPIDocs/Generated/TypeScript/fm.liveswitch/WebRtcDataChannel.ts:62

    Methods

    addOnStateChange

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

    Adds a handler that is raised when the data channel state changes.

    Parameters:

    Name Type
    value IAction1<WebRtcDataChannel>

    Returns: void

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:146


    getBytesReceived

    ▸ getBytesReceived(): number

    Gets the number of bytes received.

    Returns: number

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:158


    getBytesSent

    ▸ getBytesSent(): number

    Gets the number of bytes sent.

    Returns: number

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:170


    getConnectionId

    ▸ getConnectionId(): string

    Gets the connection identifier.

    Returns: string

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:182


    getDynamicProperties

    ▸ getDynamicProperties(): Hash<string, Object>

    Gets all dynamic properties on this instance.

    Returns: Hash<string, Object>

    Inherited from: WebRtcDataChannelBase

    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: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:58


    getId

    ▸ getId(): string

    Gets the identifier.

    Returns: string

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:202


    getInfo

    ▸ getInfo(): DataChannelInfo

    Gets the data channel info.

    Returns: DataChannelInfo

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:214


    getInstance

    ▸ getInstance(): WebRtcDataChannel

    Returns: WebRtcDataChannel

    Overrides: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannel.ts:78


    getIsInternal

    ▸ getIsInternal(): boolean

    Gets a value indicating if this is an internal data channel.

    Returns: boolean

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:237


    getIsTerminated

    ▸ getIsTerminated(): boolean

    Gets a value indicating whether the data channel is currently closed or failed.

    Returns: boolean

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:250


    getIsTerminating

    ▸ getIsTerminating(): boolean

    Gets a value indicating whether the data channel is currently closing.

    Returns: boolean

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:262


    getIsTerminatingOrTerminated

    ▸ getIsTerminatingOrTerminated(): boolean

    Gets a value indicating whether the data channel is currently closing, closed, or failed.

    Returns: boolean

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:274


    getLabel

    ▸ getLabel(): string

    Gets the label.

    Returns: string

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:286


    getMessagesReceived

    ▸ getMessagesReceived(): number

    Gets the number of messages received.

    Returns: number

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:298


    getMessagesSent

    ▸ getMessagesSent(): number

    Gets the number of messages sent.

    Returns: number

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:310


    getNativeDataChannel

    ▸ getNativeDataChannel(): any

    Returns: any

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannel.ts:21


    getOnReceive

    ▸ getOnReceive(): IAction1<DataChannelReceiveArgs>

    Gets a callback invoked when a message is received.

    TypeScript Example:

    channel.setOnReceive((messageArgs) => {
    // Do something
    });
    

    Returns: IAction1<DataChannelReceiveArgs>

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:330


    getOrdered

    ▸ getOrdered(): boolean

    Gets a value indicating whether messages will be delivered in the order they are sent.

    Returns: boolean

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:342


    getState

    ▸ getState(): DataChannelState

    Gets the state.

    Returns: DataChannelState

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:354


    getStreamId

    ▸ getStreamId(): string

    Gets the stream identifier.

    Returns: string

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:374


    getSubprotocol

    ▸ getSubprotocol(): string

    Gets the subprotocol.

    Returns: string

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:386


    getTypeString

    ▸ getTypeString(): string

    Returns: string

    Overrides: WebRtcDataChannelBase

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


    processStateChange

    ▸ ProtectedprocessStateChange(): void

    Processes a state change.

    Returns: void

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:437


    processStateLockChange

    ▸ ProtectedprocessStateLockChange(): void

    Processes a state lock change.

    Returns: void

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:448


    raiseDataBytes

    ▸ ProtectedraiseDataBytes(dataBytes: DataBuffer): void

    Raises the OnReceive callback with data bytes.

    Parameters:

    Name Type Description
    dataBytes DataBuffer The data bytes.

    Returns: void

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:464


    raiseDataString

    ▸ ProtectedraiseDataString(dataString: string): void

    Raises the OnReceive callback with a data string.

    Parameters:

    Name Type Description
    dataString string The data string.

    Returns: void

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:500


    registerDataReceived

    ▸ ProtectedregisterDataReceived(dataLength: number): void

    Registers that a data has been sent.

    Parameters:

    Name Type Description
    dataLength number The data length.

    Returns: void

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:530


    registerDataSent

    ▸ ProtectedregisterDataSent(dataLength: number): void

    Registers that a data has been sent.

    Parameters:

    Name Type Description
    dataLength number The data length.

    Returns: void

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:549


    removeOnStateChange

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

    Removes a handler that is raised when the data channel state changes.

    Parameters:

    Name Type
    value IAction1<WebRtcDataChannel>

    Returns: void

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:583


    sendDataBytes

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

    Parameters:

    Name Type
    dataBytes DataBuffer

    Returns: Future<Object>

    Implementation of: IInternalDataChannel

    Overrides: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannel.ts:146


    sendDataString

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

    Parameters:

    Name Type
    dataString string

    Returns: Future<Object>

    Implementation of: IInternalDataChannel

    Overrides: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannel.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: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:95


    setNativeDataChannel

    ▸ setNativeDataChannel(nativeDataChannel: any): void

    Parameters:

    Name Type
    nativeDataChannel any

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannel.ts:24


    setOnReceive

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

    Sets a callback invoked when a message is received.

    TypeScript Example:

    channel.setOnReceive((messageArgs) => {
    // Do something
    });
    

    Parameters:

    Name Type
    value IAction1<DataChannelReceiveArgs>

    Returns: void

    Implementation of: IInternalDataChannel

    Inherited from: WebRtcDataChannelBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataChannelBase.ts:641


    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: WebRtcDataChannelBase

    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