Crate datachannel_facade

Source
Expand description

datachannel-facade is a library that abstracts over platform-specific WebRTC DataChannel implementations.

It works both in the browser and natively (via libdatachannel).

The following docs are from MDN.

Modules§

platform
Platform-specific functionality.

Structs§

Configuration
An object providing options to configure the new connection:
DataChannel
The RTCDataChannel interface represents a network channel which can be used for bidirectional peer-to-peer transfers of arbitrary data. Every data channel is associated with an RTCPeerConnection, and each peer connection can have up to a theoretical maximum of 65,534 data channels (the actual limit may vary from browser to browser).
DataChannelOptions
An object providing configuration options for the data channel. It can contain the following fields:
Description
The RTCSessionDescription interface describes one end of a connection—or potential connection—and how it’s configured. Each RTCSessionDescription consists of a description type indicating which part of the offer/answer negotiation process it describes and of the SDP descriptor of the session.
Error
An underlying platform error.
IceServer
A server which may be used by the ICE agent; these are typically STUN and/or TURN servers.
PeerConnection
The RTCPeerConnection interface represents a WebRTC connection between the local computer and a remote peer. It provides methods to connect to a remote peer, maintain and monitor the connection, and close the connection once it’s no longer needed.

Enums§

IceGatheringState
The read-only property RTCPeerConnection.iceGatheringState returns a string that describes the connection’s ICE gathering state. This lets you detect, for example, when collection of ICE candidates has finished.
IceTransportPolicy
A string representing the current ICE transport policy. Possible values are:
PeerConnectionState
The read-only connectionState property of the RTCPeerConnection interface indicates the current state of the peer connection by returning one of the following string values: new, connecting, connected, disconnected, failed, or closed.
SdpType
The property RTCSessionDescription.type is a read-only string value which describes the description’s type.