26 Commits

Author SHA1 Message Date
philipch07
965031eb25 Add IceCandidatePairStats 2025-09-16 10:50:44 -04:00
philipch07
0d561290f4 Fix typo in FirstResponseReceivedAt 2025-09-14 14:15:06 -04:00
cnderrauber
f92d05f17c Add Req/Res count/time to candidate stats (#763)
These details will provide information for
connectivity issue.
2025-02-27 12:57:32 +08:00
Joe Turki
cad1676659 Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
2025-01-17 08:21:15 -06:00
Raja Subramanian
2d9be9b7bc Add round trip time measurement to candidate pair (#731)
* Add round trip time measurement to candidate pair

Use the round trip time measurement to populate RTT fields in
CandidatePairStats.

Atomic and tests

* Use int64 nanosecnods to make atomic easier
2024-09-16 23:59:57 +05:30
Pion
bf68674e63 Update CI configs to v0.11.15
Update lint scripts and CI configs.
2024-08-16 12:26:32 -04:00
Sean DuBois
39c90d8419 Upgrade dtls, turn and sturn
New major version of dtls causes API breaks on three packages
2024-08-12 11:43:44 -04:00
Raja Subramanian
c8227261a2 Trace log inbound messages (#641)
* Trace log inbound messages

On an ICE restart in controlled mode, seeing incoming messages
getting discarded to due to username mismatch. That is because the
broswer is still using its old candidate and user name. As the
controlled agent waits for `useCandidate` from the controlling agent,
the controlled agent does not get to connected/nominated state inspite
of getting several success responses. Suspect the controlling side does
not have `useCandidate` for the new pair and it is still sending it for
the old pair. Logging more details in trace to understand it better.

* Fix test
2024-01-11 13:46:39 +05:30
renovate[bot]
8d69e9ecd8 Update module github.com/pion/stun to v2
Generated by renovateBot
2023-09-08 14:25:52 -04:00
Steffen Vogel
53beccaed5 Harmonize capitalization of log messages 2023-07-04 05:15:54 +02:00
Steffen Vogel
5ef81b65f4 Make package REUSE compliant 2023-04-18 13:46:38 +02:00
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