Source File
data.go
Belonging Package
github.com/pion/turn/v4/internal/proto
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage protoimport// Data represents DATA attribute.//// The DATA attribute is present in all Send and Data indications. The// value portion of this attribute is variable length and consists of// the application data (that is, the data that would immediately follow// the UDP header if the data was been sent directly between the client// and the peer).//// RFC 5766 Section 14.4.type Data []byte// AddTo adds DATA to message.func ( Data) ( *stun.Message) error {.Add(stun.AttrData, )return nil}// GetFrom decodes DATA from message.func ( *Data) ( *stun.Message) error {, := .Get(stun.AttrData)if != nil {return}* =return nil}
![]() |
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. |