(addr net.Addr)
| 287 | } |
| 288 | |
| 289 | func (c *candidateBase) validateSTUNTrafficCache(addr net.Addr) bool { |
| 290 | if candidate, ok := c.remoteCandidateCaches.Load(toAddrPort(addr)); ok { |
| 291 | remoteCandidate, ok := candidate.(Candidate) |
| 292 | if !ok { |
| 293 | return false |
| 294 | } |
| 295 | |
| 296 | remoteCandidate.seen(false) |
| 297 | |
| 298 | return true |
| 299 | } |
| 300 | |
| 301 | return false |
| 302 | } |
| 303 | |
| 304 | func (c *candidateBase) addRemoteCandidateCache(candidate Candidate, srcAddr net.Addr) { |
| 305 | if c.validateSTUNTrafficCache(srcAddr) { |
no test coverage detected