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

Function WithCandidateTypes

agent_options.go:940–950  ·  view source on GitHub ↗

WithCandidateTypes sets the enabled candidate types for gathering. By default, host, server reflexive, and relay candidates are enabled. Example: agent, err := NewAgentWithOptions( WithCandidateTypes([]CandidateType{CandidateTypeHost, CandidateTypeServerReflexive}), )

(candidateTypes []CandidateType)

Source from the content-addressed store, hash-verified

938// WithCandidateTypes([]CandidateType{CandidateTypeHost, CandidateTypeServerReflexive}),
939// )
940func WithCandidateTypes(candidateTypes []CandidateType) AgentOption {
941 return func(a *Agent) error {
942 if a.constructed {
943 return ErrAgentOptionNotUpdatable
944 }
945
946 a.candidateTypes = candidateTypes
947
948 return nil
949 }
950}
951
952// WithAutomaticRenomination enables automatic renomination of candidate pairs
953// when better pairs become available after initial connection establishment.

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…