Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Candidate Extensions (RFC5245) #754

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions candidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,28 @@ type Candidate interface {
// candidate, which is useful for diagnostics and other purposes
RelatedAddress() *CandidateRelatedAddress

// Extensions returns a copy of all extension attributes associated with the ICECandidate.
// In the order of insertion, *(key value).
// Extension attributes are defined in RFC 5245, Section 15.1:
// https://datatracker.ietf.org/doc/html/rfc5245#section-15.1
//.
Extensions() []CandidateExtension

// GetExtension returns the value of the extension attribute associated with the ICECandidate.
// Extension attributes are defined in RFC 5245, Section 15.1:
// https://datatracker.ietf.org/doc/html/rfc5245#section-15.1
//.
GetExtension(key string) (value string, ok bool)

String() string
Type() CandidateType
TCPType() TCPType

Equal(other Candidate) bool

// DeepEqual same as Equal, But it also compares the candidate extensions.
DeepEqual(other Candidate) bool

Marshal() string

addr() net.Addr
Expand Down
Loading
Loading