We need to hold the same socket when gathering ServerReflexive
candidates. If we Open -> Close -> Open the port we have selected could
quickly be taken by another process
Resolves#63
Don't attempt to gather ServerReflexive candidates, instead use
net.Dialer. This properly chooses the correct interface, and still
respects our port restrictions
Resolves#58
Co-authored-by: Konstantin Itskov <konstantin.itskov@kovits.com>
Add helper function to add localCandidates. Brings down the duplication
and make sure we have a properly formed checklist when we are doing
trickle.
When comparing candidates in findPair do by value, and not address.
Before some candidates were failing to be found because of this.
This implementation is not fully tested, and we don't
handle all error case yet. We will continue to work on it though.
Tests for send/recv and shutdown are in the works.
Relates to #47
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