// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT

package ice

import 

// CandidateRelatedAddress convey transport addresses related to the
// candidate, useful for diagnostics and other purposes.
type CandidateRelatedAddress struct {
	Address string
	Port    int
}

// String makes CandidateRelatedAddress printable.
func ( *CandidateRelatedAddress) () string {
	if  == nil {
		return ""
	}

	return fmt.Sprintf(" related %s:%d", .Address, .Port)
}

// Equal allows comparing two CandidateRelatedAddresses.
// The CandidateRelatedAddress are allowed to be nil.
func ( *CandidateRelatedAddress) ( *CandidateRelatedAddress) bool {
	if  == nil &&  == nil {
		return true
	}

	return  != nil &&  != nil &&
		.Address == .Address &&
		.Port == .Port
}