Debian Codegraph @

candidaterelatedaddress.go

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
2 // SPDX-License-Identifier: MIT
3
4 package icescip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/
5
6 import "fmtscip-go gomod github.com/golang/go/src go1.21 fmt/"
7
8 // CandidateRelatedAddress convey transport addresses related to the
9 // candidate, useful for diagnostics and other purposes.
10 type CandidateRelatedAddressscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress# struct {
11 Addressscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#Address. string
12 Portscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#Port. int
13 }
14
15 // String makes CandidateRelatedAddress printable.
16 func (c *CandidateRelatedAddressscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#) Stringscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#String().() string {
17 if c == nil {
18 return ""
19 }
20
21 return fmtscip-go gomod github.com/golang/go/src go1.21 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.21 fmt/Sprintf().(" related %s:%d", c.Addressscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#Address., c.Portscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#Port.)
22 }
23
24 // Equal allows comparing two CandidateRelatedAddresses.
25 // The CandidateRelatedAddress are allowed to be nil.
26 func (c *CandidateRelatedAddressscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#) Equalscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#Equal().(other *CandidateRelatedAddressscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#) bool {
27 if c == nil && other == nil {
28 return true
29 }
30
31 return c != nil && other != nil &&
32 c.Addressscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#Address. == other.Addressscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#Address. &&
33 c.Portscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#Port. == other.Portscip-go gomod github.com/pion/ice/v4 . `github.com/pion/ice/v4`/CandidateRelatedAddress#Port.
34 }