Source File
relayedaddr.go
Belonging Package
github.com/pion/turn/v4/internal/proto
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage protoimport ()// RelayedAddress implements XOR-RELAYED-ADDRESS attribute.//// It specifies the address and port that the server allocated to the// client. It is encoded in the same way as XOR-MAPPED-ADDRESS.//// RFC 5766 Section 14.5.type RelayedAddress struct {IP net.IPPort int}func ( RelayedAddress) () string {return stun.XORMappedAddress().String()}// AddTo adds XOR-PEER-ADDRESS to message.func ( RelayedAddress) ( *stun.Message) error {return stun.XORMappedAddress().AddToAs(, stun.AttrXORRelayedAddress)}// GetFrom decodes XOR-PEER-ADDRESS from message.func ( *RelayedAddress) ( *stun.Message) error {return (*stun.XORMappedAddress)().GetFromAs(, stun.AttrXORRelayedAddress)}// XORRelayedAddress implements XOR-RELAYED-ADDRESS attribute.//// It specifies the address and port that the server allocated to the// client. It is encoded in the same way as XOR-MAPPED-ADDRESS.//// RFC 5766 Section 14.5.type XORRelayedAddress = RelayedAddress
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |