WithNetworkMonitorInterval sets the interval at which the agent checks for network interface changes when using GatherContinually policy. This option only has effect when used with WithContinualGatheringPolicy(GatherContinually). Default is 2 seconds if not specified. Example: agent, err := NewAg
(interval time.Duration)
| 842 | // WithNetworkMonitorInterval(5 * time.Second), |
| 843 | // ) |
| 844 | func WithNetworkMonitorInterval(interval time.Duration) AgentOption { |
| 845 | return func(a *Agent) error { |
| 846 | if a.constructed { |
| 847 | return ErrAgentOptionNotUpdatable |
| 848 | } |
| 849 | |
| 850 | if interval <= 0 { |
| 851 | return ErrInvalidNetworkMonitorInterval |
| 852 | } |
| 853 | a.networkMonitorInterval = interval |
| 854 | |
| 855 | return nil |
| 856 | } |
| 857 | } |
| 858 | |
| 859 | // WithNetworkTypes sets the enabled candidate network types for candidate gathering. |
| 860 | // This controls the network types exposed in ICE candidates and used for pairing. |
no outgoing calls
searching dependent graphs…