session.sendDatagram(datagram)
-
datagram
<string> | <ArrayBufferView> -
返回:<bigint>
¥Returns: <bigint>
向远程对等方发送不可靠的数据报,返回数据报 ID。如果数据报有效负载指定为 ArrayBufferView
,则该视图的所有权将转移到底层流。
¥Sends an unreliable datagram to the remote peer, returning the datagram ID.
If the datagram payload is specified as an ArrayBufferView
, then ownership of
that view will be transfered to the underlying stream.