Skip to content
  • Youness Alaoui's avatar
    Add support for ICE-TCP · a6954838
    Youness Alaoui authored and Olivier Crête's avatar Olivier Crête committed
    This is a massive commit that can't be split. We add ice-tcp support
    into the agent by creating local host tcp-active/tcp-passive candidates.
    We also need to find the local and remote candidates whenever we discover
    a peer-reflexive because their data is important to setup the peer-reflexive
    so a few changes were added to look for the local or remote candidate.
    For TCP-ACTIVE remote peer-reflexive candidates, we can't add conncheck
    pairs normally because TCP-PASSIVE (local) do not generate candidate pairs,
    and we also can't have a connection from any local host, so we can only create
    a single candidatepair with the local/remote that are connected.
    The pair->socket of a candidate check pair will hold the connected tcp socket
    (through connect for ACT or accept for PASS) and we will either have a
    remote or a local peer-reflexive which will create a new candidate pair,
    we cannot trigger checks on the initial candidate pair, we must only do it
    on the new check pairs. but in the case of a tcp-passive, we don't get a new
    local peer-reflexive candidate, so there is no new candidate with a new NiceSocket, so
    when we get a triggered check, we need to match it to the candidate check pair
    or when we select a pair, it will still use the original TCP-PASS socket.
    We must store the new connected tcp socket in the peer reflexive candidates
    since they represent that unique peer-reflx candidate's connection
    a6954838