DataChannelReceiver interface

DataChannel 接收器

属性

channelId
senderParticipantIdentifier

方法

off("close", DataChannelReceiverCloseEvent)
off("messageReady", DataChannelReceiverMessageReadyEvent)
on("close", DataChannelReceiverCloseEvent)
on("messageReady", DataChannelReceiverMessageReadyEvent)
readMessage()

属性详细信息

channelId

channelId: number

属性值

number

senderParticipantIdentifier

senderParticipantIdentifier: CommunicationIdentifierKind

属性值

方法详细信息

off("close", DataChannelReceiverCloseEvent)

function off(event: "close", listener: DataChannelReceiverCloseEvent)

参数

event

"close"

off("messageReady", DataChannelReceiverMessageReadyEvent)

function off(event: "messageReady", listener: DataChannelReceiverMessageReadyEvent)

参数

event

"messageReady"

on("close", DataChannelReceiverCloseEvent)

function on(event: "close", listener: DataChannelReceiverCloseEvent)

参数

event

"close"

on("messageReady", DataChannelReceiverMessageReadyEvent)

function on(event: "messageReady", listener: DataChannelReceiverMessageReadyEvent)

参数

event

"messageReady"

readMessage()

function readMessage(): undefined | DataChannelMessage

返回

undefined | DataChannelMessage