Skip to main content

Class: RTCDataChannel

Hierarchy#

Constructors#

constructor#

new RTCDataChannel(transport, parameters, sendOpen?)

Parameters#

NameTypeDefault value
transportRTCSctpTransportundefined
parametersRTCDataChannelParametersundefined
sendOpenbooleantrue

Overrides#

EventTarget.constructor

Defined in#

packages/webrtc/src/dataChannel.ts:27

Properties#

_bufferedAmountLowThreshold#

Private _bufferedAmountLowThreshold: number = 0

Defined in#

packages/webrtc/src/dataChannel.ts:27


bufferedAmount#

bufferedAmount: number = 0

Defined in#

packages/webrtc/src/dataChannel.ts:26


bufferedAmountLow#

Readonly bufferedAmountLow: default<any[]>

Defined in#

packages/webrtc/src/dataChannel.ts:15


error#

Readonly error: default<[Error]>

Defined in#

packages/webrtc/src/dataChannel.ts:14


id#

id: number

Defined in#

packages/webrtc/src/dataChannel.ts:23


isCreatedByRemote#

isCreatedByRemote: boolean = false

Defined in#

packages/webrtc/src/dataChannel.ts:22


message#

Readonly message: default<[string | Buffer]>

Defined in#

packages/webrtc/src/dataChannel.ts:12


onclose#

Optional onclose: Callback

Defined in#

packages/webrtc/src/dataChannel.ts:17


onclosing#

Optional onclosing: Callback

Defined in#

packages/webrtc/src/dataChannel.ts:18


onerror#

Optional onerror: CallbackWithValue<RTCErrorEvent>

Defined in#

packages/webrtc/src/dataChannel.ts:21


onmessage#

Optional onmessage: CallbackWithValue<MessageEvent>

Defined in#

packages/webrtc/src/dataChannel.ts:19


onopen#

Optional onopen: Callback

Defined in#

packages/webrtc/src/dataChannel.ts:16


readyState#

readyState: DCState = "connecting"

Defined in#

packages/webrtc/src/dataChannel.ts:24


sendOpen#

Readonly sendOpen: boolean = true


stateChanged#

Readonly stateChanged: default<[DCState]>

Defined in#

packages/webrtc/src/dataChannel.ts:11


captureRejectionSymbol#

Static Readonly captureRejectionSymbol: typeof captureRejectionSymbol

Inherited from#

EventTarget.captureRejectionSymbol

Defined in#

node_modules/@types/node/events.d.ts:43


captureRejections#

Static captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Inherited from#

EventTarget.captureRejections

Defined in#

node_modules/@types/node/events.d.ts:49


defaultMaxListeners#

Static defaultMaxListeners: number

Inherited from#

EventTarget.defaultMaxListeners

Defined in#

node_modules/@types/node/events.d.ts:50


errorMonitor#

Static Readonly errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Inherited from#

EventTarget.errorMonitor

Defined in#

node_modules/@types/node/events.d.ts:42

Accessors#

bufferedAmountLowThreshold#

get bufferedAmountLowThreshold(): number

Returns#

number

Defined in#

packages/webrtc/src/dataChannel.ts:74

set bufferedAmountLowThreshold(value): void

Parameters#

NameType
valuenumber

Returns#

void

Defined in#

packages/webrtc/src/dataChannel.ts:78


label#

get label(): string

Returns#

string

Defined in#

packages/webrtc/src/dataChannel.ts:62


maxPacketLifeTime#

get maxPacketLifeTime(): undefined | number

Returns#

undefined | number

Defined in#

packages/webrtc/src/dataChannel.ts:58


maxRetransmits#

get maxRetransmits(): undefined | number

Returns#

undefined | number

Defined in#

packages/webrtc/src/dataChannel.ts:54


negotiated#

get negotiated(): boolean

Returns#

boolean

Defined in#

packages/webrtc/src/dataChannel.ts:70


ordered#

get ordered(): boolean

Returns#

boolean

Defined in#

packages/webrtc/src/dataChannel.ts:50


protocol#

get protocol(): string

Returns#

string

Defined in#

packages/webrtc/src/dataChannel.ts:66

Methods#

addBufferedAmount#

addBufferedAmount(amount): void

Parameters#

NameType
amountnumber

Returns#

void

Defined in#

packages/webrtc/src/dataChannel.ts:112


addEventListener#

addEventListener(type, listener): void

Parameters#

NameType
typestring
listener(...args: any[]) => void

Returns#

void

Inherited from#

EventTarget.addEventListener

Defined in#

packages/webrtc/src/helper.ts:37


addListener#

addListener(event, listener): RTCDataChannel

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

RTCDataChannel

Inherited from#

EventTarget.addListener

Defined in#

node_modules/@types/node/events.d.ts:62


close#

close(): void

Returns#

void

Defined in#

packages/webrtc/src/dataChannel.ts:127


emit#

emit(event, ...args): boolean

Parameters#

NameType
eventstring | symbol
...argsany[]

Returns#

boolean

Inherited from#

EventTarget.emit

Defined in#

node_modules/@types/node/events.d.ts:72


eventNames#

eventNames(): (string | symbol)[]

Returns#

(string | symbol)[]

Inherited from#

EventTarget.eventNames

Defined in#

node_modules/@types/node/events.d.ts:77


getMaxListeners#

getMaxListeners(): number

Returns#

number

Inherited from#

EventTarget.getMaxListeners

Defined in#

node_modules/@types/node/events.d.ts:69


listenerCount#

listenerCount(event): number

Parameters#

NameType
eventstring | symbol

Returns#

number

Inherited from#

EventTarget.listenerCount

Defined in#

node_modules/@types/node/events.d.ts:73


listeners#

listeners(event): Function[]

Parameters#

NameType
eventstring | symbol

Returns#

Function[]

Inherited from#

EventTarget.listeners

Defined in#

node_modules/@types/node/events.d.ts:70


off#

off(event, listener): RTCDataChannel

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

RTCDataChannel

Inherited from#

EventTarget.off

Defined in#

node_modules/@types/node/events.d.ts:66


on#

on(event, listener): RTCDataChannel

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

RTCDataChannel

Inherited from#

EventTarget.on

Defined in#

node_modules/@types/node/events.d.ts:63


once#

once(event, listener): RTCDataChannel

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

RTCDataChannel

Inherited from#

EventTarget.once

Defined in#

node_modules/@types/node/events.d.ts:64


prependListener#

prependListener(event, listener): RTCDataChannel

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

RTCDataChannel

Inherited from#

EventTarget.prependListener

Defined in#

node_modules/@types/node/events.d.ts:75


prependOnceListener#

prependOnceListener(event, listener): RTCDataChannel

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

RTCDataChannel

Inherited from#

EventTarget.prependOnceListener

Defined in#

node_modules/@types/node/events.d.ts:76


rawListeners#

rawListeners(event): Function[]

Parameters#

NameType
eventstring | symbol

Returns#

Function[]

Inherited from#

EventTarget.rawListeners

Defined in#

node_modules/@types/node/events.d.ts:71


removeAllListeners#

removeAllListeners(event?): RTCDataChannel

Parameters#

NameType
event?string | symbol

Returns#

RTCDataChannel

Inherited from#

EventTarget.removeAllListeners

Defined in#

node_modules/@types/node/events.d.ts:67


removeEventListener#

removeEventListener(type, listener): void

Parameters#

NameType
typestring
listener(...args: any[]) => void

Returns#

void

Inherited from#

EventTarget.removeEventListener

Defined in#

packages/webrtc/src/helper.ts:41


removeListener#

removeListener(event, listener): RTCDataChannel

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

RTCDataChannel

Inherited from#

EventTarget.removeListener

Defined in#

node_modules/@types/node/events.d.ts:65


send#

send(data): void

Parameters#

NameType
datastring | Buffer

Returns#

void

Defined in#

packages/webrtc/src/dataChannel.ts:123


setId#

setId(id): void

Parameters#

NameType
idnumber

Returns#

void

Defined in#

packages/webrtc/src/dataChannel.ts:86


setMaxListeners#

setMaxListeners(n): RTCDataChannel

Parameters#

NameType
nnumber

Returns#

RTCDataChannel

Inherited from#

EventTarget.setMaxListeners

Defined in#

node_modules/@types/node/events.d.ts:68


setReadyState#

setReadyState(state): void

Parameters#

NameType
stateDCState

Returns#

void

Defined in#

packages/webrtc/src/dataChannel.ts:90


listenerCount#

Static listenerCount(emitter, event): number

deprecated since v4.0.0

Parameters#

NameType
emitterEventEmitter
eventstring | symbol

Returns#

number

Inherited from#

EventTarget.listenerCount

Defined in#

node_modules/@types/node/events.d.ts:31


on#

Static on(emitter, event): AsyncIterableIterator<any>

Parameters#

NameType
emitterEventEmitter
eventstring

Returns#

AsyncIterableIterator<any>

Inherited from#

EventTarget.on

Defined in#

node_modules/@types/node/events.d.ts:28


once#

Static once(emitter, event): Promise<any[]>

Parameters#

NameType
emitterNodeEventTarget
eventstring | symbol

Returns#

Promise<any[]>

Inherited from#

EventTarget.once

Defined in#

node_modules/@types/node/events.d.ts:26

Static once(emitter, event): Promise<any[]>

Parameters#

NameType
emitterDOMEventTarget
eventstring

Returns#

Promise<any[]>

Inherited from#

EventTarget.once

Defined in#

node_modules/@types/node/events.d.ts:27