Commit Graph

15 Commits

Author SHA1 Message Date
Sean DuBois
e0db6d259e Don't drop Binding Requests in Controlled Agent
A controlled Agent would discard incoming Binding Requests if it didn't
cause the pair to be selected. For UDP Candidate this would be
interpreted as packet loss. For TCP Candidates not responding with a
Binding Success could be interpreted as a failure.

Firefox's ICE Agent would disconnect TCP Candidates because of this
behavior.

Resolves to pion/webrtc#2125
Resolves to pion/webrtc#1356
See https://bugzilla.mozilla.org/show_bug.cgi?id=1756460
2022-02-22 12:17:26 -05:00
Sean DuBois
6e4403794a Implement GetSelectedCandidatePair
Related to pion/webrtc#1713
2021-04-10 16:52:52 -07:00
Will Forcey
c2e6f947d0 Fix candidatePair.String() nil pointer
Resolves #197
2021-01-16 22:45:40 -08:00
Hugo Arregui
d2d97a6293 Add nominated flag to candidate pair stats
This way we can identify, between the valid candidate, which one has
been nominated.
2019-06-28 04:05:21 +00:00
Hugo Arregui
da599f54ff CandidatePairState is public now
Use more appropiate naming
2019-06-22 11:55:06 +00:00
Hugo Arregui
165d04e58f Use binding request for keepalive
instead of indication (to support consent refreshness)
2019-06-03 21:48:44 -07:00
Hugo Arregui
bf57064619 Improve nomination
This implements a basic validation schema using a checklist. We try
every pair at least maxTries, and mark it as failed if we don't get a
success response after that many requests. Once we get a success
response, we check if it belongs to the best candidate available so far,
if it does we nominate it, otherwise we continue.

Also, after a given timeout, if no candidate has been nominated, we
simply choose the best valid candidate we got so far (if no candidate is
valid, we mark the connection as failed).

Finally, the nomination request also has a maximum of maxTries, we mark
the connection as failed if after that many attempt we fail to get a
success response.
2019-06-01 00:54:16 -07:00
Sean DuBois
63b37975b6 Make Candidate an interface
This change will allow us to have custom logic and members
per interface type. Relay candidates will have a completely different
read loop, and candidate specific state.

Relates to #47
2019-05-24 15:55:42 -07:00
Aleksandr Razumov
35330ae9e7 Use merged pion/stun instead of gortc/stun
The only thing that should be changed after complete merge is version
2019-05-21 15:53:04 -07:00
Aleksandr Razumov
d895187fa4 Prepare for stun v2
Using github.com/gortc/stun for now.
Should be easy to change it later.
2019-05-21 15:53:04 -07:00
Hugo Arregui
05a28b3ee3 Handle INDICATION messages
Handle keepAlive messages
2019-05-04 09:30:50 -07:00
Michael MacDonald
ad7c8697fd Candidate priority is incorrectly calculated
Some constants were being incorrectly generated using 2^N (XOR)
instead of 1 << N. This resulted in incorrect candidate priorities
being used to evaluate candidate pairs.

Resolves #14.
2019-04-11 13:40:39 -04:00
Sean DuBois
af1bcf662b Mass replace pions -> pion
Pions organization was renamed to pion
2019-04-04 14:22:31 -07:00
backkem
de29578470 Move logging out of tree
Relates to #361
2019-03-21 12:48:57 +01:00
Michael MacDonald
dc966e04a9 Move pkg/ice to internal/ice
Avoid exposing any non-standard API.
2019-03-01 08:07:42 -05:00