WithIPFilter sets a filter for IP addresses used during candidate gathering.
(filter func(net.IP) bool)
| 486 | |
| 487 | // WithIPFilter sets a filter for IP addresses used during candidate gathering. |
| 488 | func WithIPFilter(filter func(net.IP) bool) AgentOption { |
| 489 | return func(a *Agent) error { |
| 490 | if a.constructed { |
| 491 | return ErrAgentOptionNotUpdatable |
| 492 | } |
| 493 | |
| 494 | a.ipFilter = filter |
| 495 | |
| 496 | return nil |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | // WithRemoteIPFilter sets a filter for remote candidate IP addresses. |
| 501 | // Candidates for which this function returns false are ignored. |
no outgoing calls
searching dependent graphs…