Class SdpUtil
java.lang.Object
org.cloudburstmc.netty.util.nethernet.SdpUtil
Helpers for the SDP documents exchanged during signalling.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringcandidateAddress(String candidate) The connection address of ana=candidate:line, or null if it has none.static StringwithAdvertisedCandidates(String sdp, Set<String> allowed) Drops every ICE candidate whose address is not inallowed.
-
Method Details
-
candidateAddress
The connection address of ana=candidate:line, or null if it has none.The grammar of RFC 5245 section 15.1 puts the address in the fifth token, after the foundation, component, transport and priority.
- Parameters:
candidate- The candidate line- Returns:
- The address it points at
-
withAdvertisedCandidates
Drops every ICE candidate whose address is not inallowed.ICE gathers a candidate on every interface it can see, which on a host network includes container and overlay addresses that are unreachable from outside. Each one costs the remote peer a round of connectivity checks before it gives up, so a host that knows which of its addresses are reachable can announce only those. If nothing would be left the description is returned untouched, since no candidates at all can never connect.
- Parameters:
sdp- The description to filterallowed- The addresses that may be announced, empty to announce everything- Returns:
- The filtered description
-