共用方式為


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