Files
platform-external-webrtc/pc/g3doc/sctp_transport.md
Harald Alvestrand 77d73a62d5 Document SctpTransport
This also creates a g3doc directory under pc/

Bug: webrtc:12552
Change-Id: I0913c88831658776a0f02174b57b539ac85b4a9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215077
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33718}
2021-04-14 07:00:04 +00:00

2.0 KiB

SctpTransport

webrtc::SctpTransport

The webrtc::SctpTransport class encapsulates an SCTP association, and exposes a few properties of this association to the WebRTC user (such as Chrome).

The SctpTransport is used to support Datachannels, as described in the WebRTC specification for the Peer-to-peer Data API.

The public interface (webrtc::SctpTransportInterface) exposes an observer interface where the user can define a callback to be called whenever the state of an SctpTransport changes; this callback is called on the network thread (as set during PeerConnectionFactory initialization).

The implementation of this object lives in pc/sctp_transport.{h,cc}, and is basically a wrapper around a cricket::SctpTransportInternal, hiding its implementation details and APIs that shoudldn't be accessed from the user.

The webrtc::SctpTransport is a ref counted object; it should be regarded as owned by the PeerConnection, and will be closed when the PeerConnection closes, but the object itself may survive longer than the PeerConnection.

cricket::SctpTransportInternal

cricket::SctpTransportInternal owns two objects: The SCTP association object (currently implemented by wrapping the usrsctp library) and the DTLS transport, which is the object used to send and receive messages as emitted from or consumed by the usrsctp library.

It communicates state changes and events using sigslot.

See header files for details.