rtci-ice
An ICE agent for WebRTC: candidates, their priorities and pairing, connectivity checks over STUN, nomination, consent freshness and ICE restarts, with trickle ICE and ICE over TCP.
Specifications
- RFC 8445, Interactive Connectivity Establishment
- RFC 8838, Trickle ICE
- RFC 6544, TCP candidates with ICE
- RFC 7675, STUN usage for consent freshness
- RFC 8421, multihomed and dual-stack ICE
- RFC 8489, STUN, as ICE uses it
- draft-ietf-mmusic-mdns-ice-candidates, mDNS names for host candidates
- RFC 8839, the ICE candidate attribute grammar
Clause-by-clause status, with the test that proves each clause: rfc8445, rfc8838, rfc6544, rfc7675, rfc8421, draft-ietf-mmusic-mdns-ice-candidates.
Use
The root crate (rtci) runs an Agent per transport. Used on its own,
agent::Agent takes local and remote candidates (candidate), inbound STUN datagrams and
time, and gives the checks to send, the state changes and the selected pair.
Sans-I/O
The agent never gathers by itself: the application binds the sockets and tells it which local candidates exist (the root crate's stream interface gathers TCP candidates for it). The crate does no I/O and reads no clock: every call that depends on time takes an Instant from the caller.
Licence
Licensed under either of the MIT licence or the Apache License, Version 2.0, at your option.
This crate is part of the rtci workspace, which descends from
webrtc-rs/rtc and is developed independently;
FORK.md lists what it carries over upstream. Upstream's licence and copyright
notices are retained.