gecko-dev/media/mtransport
Byron Campen [:bwc] ca982a9fae Bug 1493689 - Defer close of old stream after ICE restart. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D7626

--HG--
extra : rebase_source : d842ee5e65330177afc3d215f94ef69ab800412b
2018-10-04 21:30:22 -04:00
..
build
fuzztest
ipc
test Bug 1486012: Rework ICE restart. r=mjf 2018-09-20 16:07:51 +00:00
third_party Bug 1486012: Rework ICE restart. r=mjf 2018-09-20 16:07:51 +00:00
common.build Bug 1486012: Rework ICE restart. r=mjf 2018-09-20 16:07:51 +00:00
dtlsidentity.cpp
dtlsidentity.h
logging.h
m_cpp_utils.h
mediapacket.cpp
mediapacket.h
moz.build
nr_socket_prsock.cpp
nr_socket_prsock.h
nr_timer.cpp
nricectx.cpp Bug 1486012: Rework ICE restart. r=mjf 2018-09-20 16:07:51 +00:00
nricectx.h Bug 1486012: Rework ICE restart. r=mjf 2018-09-20 16:07:51 +00:00
nricemediastream.cpp Bug 1493689 - Defer close of old stream after ICE restart. r=mjf 2018-10-04 21:30:22 -04:00
nricemediastream.h Bug 1493689 - Defer close of old stream after ICE restart. r=mjf 2018-10-04 21:30:22 -04:00
nriceresolver.cpp
nriceresolver.h Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus 2018-09-22 23:54:11 +03:00
nriceresolverfake.cpp
nriceresolverfake.h
nricestunaddr.cpp
nricestunaddr.h
nrinterfaceprioritizer.cpp
nrinterfaceprioritizer.h
README
rlogconnector.cpp
rlogconnector.h
runnable_utils.h
sigslot.h
simpletokenbucket.cpp
simpletokenbucket.h
SrtpFlow.cpp Bug 1479665: add GCM ciphers to SrtpFlow. r=bwc 2018-09-14 03:12:05 +00:00
SrtpFlow.h Bug 1479665: add GCM ciphers to SrtpFlow. r=bwc 2018-09-14 03:12:05 +00:00
stun_socket_filter.cpp
stun_socket_filter.h
test_nr_socket.cpp
test_nr_socket.h
transportflow.cpp
transportflow.h
transportlayer.cpp
transportlayer.h
transportlayerdtls.cpp Bug 1491511: add Telemetry for SRTP cipher usage. r=mt 2018-09-19 00:08:25 +00:00
transportlayerdtls.h Bug 1480869: define SRTP ciphers suites inside mtransport r=mt 2018-09-11 03:58:34 +00:00
transportlayerice.cpp Bug 1486012: Rework ICE restart. r=mjf 2018-09-20 16:07:51 +00:00
transportlayerice.h Bug 1486012: Rework ICE restart. r=mjf 2018-09-20 16:07:51 +00:00
transportlayerlog.cpp
transportlayerlog.h
transportlayerloopback.cpp
transportlayerloopback.h
transportlayersrtp.cpp Bug 1492834 - Remove "Attempting to protect RTP" and related log messages; r=bwc 2018-09-20 14:11:44 +00:00
transportlayersrtp.h

This is a generic media transport system for WebRTC.

The basic model is that you have a TransportFlow which contains a
series of TransportLayers, each of which gets an opportunity to
manipulate data up and down the stack (think SysV STREAMS or a
standard networking stack). You can also address individual
sublayers to manipulate them or to bypass reading and writing
at an upper layer; WebRTC uses this to implement DTLS-SRTP.


DATAFLOW MODEL
Unlike the existing nsSocket I/O system, this is a push rather
than a pull system. Clients of the interface do writes downward
with SendPacket() and receive notification of incoming packets
via callbacks registed via sigslot.h. It is the responsibility
of the bottom layer (or any other layer which needs to reference
external events) to arrange for that somehow; typically by
using nsITimer or the SocketTansportService.

This sort of push model is a much better fit for the demands
of WebRTC, expecially because ICE contexts span multiple
network transports.


THREADING MODEL
There are no thread locks. It is the responsibility of the caller to
arrange that any given TransportLayer/TransportFlow is only
manipulated in one thread at once. One good way to do this is to run
everything on the STS thread. Many of the existing layer implementations
(TransportLayerIce, TransportLayerLoopback) already run on STS so in those
cases you must run on STS, though you can do setup on the main thread and
then activate them on the STS.


EXISTING TRANSPORT LAYERS
The following transport layers are currently implemented:

* DTLS -- a wrapper around NSS's DTLS [RFC 6347] stack
* ICE  -- a wrapper around the nICEr ICE [RFC 5245] stack.
* Loopback -- a loopback IO mechanism
* Logging -- a passthrough that just logs its data

The last two are primarily for debugging.