Source File
tcp_conn.go
Belonging Package
github.com/pion/turn/v4/internal/client
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage clientimport ()var (errInvalidTURNFrame = errors.New("data is not a valid TURN frame, no STUN or ChannelData found")errIncompleteTURNFrame = errors.New("data contains incomplete STUN or TURN frame"))const (stunHeaderSize = 20)var _ transport.TCPConn = (*TCPConn)(nil) // Includes type check for net.Conn// TCPConn wraps a transport.TCPConn and returns the allocations relayed// transport address in response to TCPConn.LocalAddress().type TCPConn struct {transport.TCPConnremoteAddress *net.TCPAddrallocation *TCPAllocationConnectionID proto.ConnectionID}type connectionAttempt struct {from *net.TCPAddrcid proto.ConnectionID}// LocalAddr returns the local network address.// The Addr returned is shared by all invocations of LocalAddr, so do not modify it.func ( *TCPConn) () net.Addr {return .allocation.Addr()}// RemoteAddr returns the remote network address.// The Addr returned is shared by all invocations of RemoteAddr, so do not modify it.func ( *TCPConn) () net.Addr {return .remoteAddress}
![]() |
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. |