Class CandidatePair

java.lang.Object
tel.schich.libdatachannel.CandidatePair

public class CandidatePair extends Object
The candidate pair ICE selected, as the candidate lines the native library reports them.

The remote side is where traffic actually arrives from, which behind a NAT is usually a peer reflexive candidate the remote description never carried. For a pair that is not relayed, libjuice sends from one socket and does not track which local candidate it used, so the local side is the first candidate it gathered.

  • Method Details

    • localCandidate

      public String localCandidate()
      Returns:
      the local candidate line, as candidate:...
    • remoteCandidate

      public String remoteCandidate()
      Returns:
      the remote candidate line, as candidate:...
    • local

      public InetSocketAddress local()
      Returns:
      the local candidate's address, or null if the line cannot be read; only an mDNS name is left unresolved
    • remote

      public InetSocketAddress remote()
      Returns:
      the remote candidate's address, or null if the line cannot be read; only an mDNS name is left unresolved
    • localType

      public String localType()
      Returns:
      the local candidate's type, host, srflx, prflx or relay, or null if the line cannot be read
    • remoteType

      public String remoteType()
      Returns:
      the remote candidate's type, host, srflx, prflx or relay, or null if the line cannot be read