peerix - v0.8.0
    Preparing search index...

    Interface SendOptions

    Options for sending a message through a data channel.

    interface SendOptions {
        info?: Record<string, unknown>;
        label?: string;
        signal?: AbortSignal;
        to?: string | string[];
    }
    Index
    info?: Record<string, unknown>

    Optional information about the message, such as a file name, that the receiver can read as info before reading the data. It is sent as JSON with the first chunk, so it must be smaller than one chunk (about 16 KB). The send fails if it is too large or cannot be serialized.

    Unlike peer metadata, which describes a peer for the whole connection, info describes a single message.

    label?: string

    Channel label. If omitted, default is used.

    signal?: AbortSignal

    AbortSignal to cancel the send operation.

    to?: string | string[]

    The target peer or peers to send the message to.