Interface IPeerConnectionDataChannelConnector

The peer connection data channel connector interface.

interface IPeerConnectionDataChannelConnector {
    bufferedAmount: number;
    bufferedAmountLowThreshold: number;
    onBufferedAmountLow: null | (() => void);
    onClose: null | (() => void);
    onMessage: null | ((message) => void);
    state: string;
    close(): void;
    send(data): void;
    send(data): void;
}

Properties

bufferedAmount: number

The current buffered amount.

bufferedAmountLowThreshold: number

The low threshold for the buffered amount.

onBufferedAmountLow: null | (() => void)

The callback for when the buffered amount is low.

Type declaration

    • (): void
    • Returns void

onClose: null | (() => void)

The callback for when the data channel closes.

Type declaration

    • (): void
    • Returns void

onMessage: null | ((message) => void)

The callback for when a message is received on the data channel.

Type declaration

    • (message): void
    • Parameters

      Returns void

state: string

The current state of the data channel.

Methods

  • Closes the data channel.

    Returns void

  • Sends data on the data channel.

    Parameters

    • data: string

      The data to send.

    Returns void

  • Sends data on the data channel.

    Parameters

    Returns void

Generated using TypeDoc