Interface DataChannelOptions

interface DataChannelOptions {
    bufferedAmountLowEventTimeout?: number;
    closeTimeout?: number;
    drainTimeout?: number;
    maxBufferedAmount?: number;
    maxMessageSize?: number;
    openTimeout?: number;
}

Properties

bufferedAmountLowEventTimeout?: number

When bufferedAmount is above maxBufferedAmount, we pause sending until the bufferedAmountLow event fires - this controls how long we wait for that event in ms

Default

30000
closeTimeout?: number

When closing a stream we first send a FIN flag to the remote and wait for a FIN_ACK reply before closing the underlying RTCDataChannel - this controls how long we wait for the acknowledgement in ms

Default

5000
drainTimeout?: number

When closing a stream, we wait for bufferedAmount to become 0 before closing the underlying RTCDataChannel - this controls how long we wait in ms

Default

30000
maxBufferedAmount?: number

If the channel's bufferedAmount grows over this amount in bytes, wait for it to drain before sending more data

Default

16777216
maxMessageSize?: number

The maximum message size sendable over the channel in bytes

Default

16384
openTimeout?: number

When sending the first data message, if the channel is not in the "open" state, wait this long for the "open" event to fire.