peerix - v0.6.0
    Preparing search index...

    Interface ChannelEvent

    Emitted when a data channel is created or received from a peer, when a data channel is opened or closed, when a message is received on a data channel, or when an error occurs.

    interface ChannelEvent {
        channel: RTCDataChannel;
        data?: ReadableStream<Uint8Array<ArrayBufferLike>> & PromiseLike<unknown>;
        error?: PeerixError;
        info?: Record<string, unknown>;
        label: string;
        name:
            | "channel:new"
            | "channel:open"
            | "channel:close"
            | "channel:message"
            | "channel:error";
        peer: Peer;
    }
    Index
    channel: RTCDataChannel

    Data channel associated with the event.

    data?: ReadableStream<Uint8Array<ArrayBufferLike>> & PromiseLike<unknown>

    Received message data for message events.

    error?: PeerixError

    Error object containing details about the error for error events.

    info?: Record<string, unknown>

    Optional additional information associated with the message event.

    label: string

    Label of the data channel.

    name:
        | "channel:new"
        | "channel:open"
        | "channel:close"
        | "channel:message"
        | "channel:error"

    Name of the event.

    peer: Peer

    Peer object containing connection details.