MCPcopy Create free account
hub / github.com/pion/ice / WithNetworkMonitorInterval

Function WithNetworkMonitorInterval

agent_options.go:844–857  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

842// WithNetworkMonitorInterval(5 * time.Second),
843// )
844func 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.

Callers 3

TestAgentUpdateOptionsFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestAgentUpdateOptionsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…