Add support for passive ICE TCP candidate

Closes #196
This commit is contained in:
Jerko Steiner
2020-07-04 09:49:55 +02:00
parent f287f49c89
commit 12f44e93f1
20 changed files with 907 additions and 38 deletions

View File

@@ -119,15 +119,18 @@ func TestSTUNConcurrency(t *testing.T) {
a, err := NewAgent(&AgentConfig{
NetworkTypes: supportedNetworkTypes,
Urls: urls,
CandidateTypes: []CandidateType{CandidateTypeServerReflexive},
CandidateTypes: []CandidateType{CandidateTypeHost, CandidateTypeServerReflexive},
TCPListenPort: 9999,
})
assert.NoError(t, err)
candidateGathered, candidateGatheredFunc := context.WithCancel(context.Background())
assert.NoError(t, a.OnCandidate(func(c Candidate) {
if c != nil {
if c == nil {
candidateGatheredFunc()
return
}
t.Log(c.NetworkType(), c.Priority(), c)
}))
assert.NoError(t, a.GatherCandidates())