Documentation
¶
Overview ¶
Package turn holds the TURN dialer of mediactl: conns to peers relayed through a TURN server, over a UDP allocation or an RFC 6062 TCP connection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
type Dialer struct {
// URI is the TURN server, turn:<host>:<port>?transport=udp|tcp, or turns: for TLS and DTLS.
URI string
// Username and Password are the long-term credentials, none if empty.
Username, Password string
// Insecure skips the verification of the TURN server's certificate.
Insecure bool
// LoggerFactory makes the TURN client's logger; nil logs nothing.
LoggerFactory logging.LoggerFactory
}
Dialer opens conns to peers relayed through a TURN server.
func (Dialer) DialContext ¶
DialContext opens a conn to the peer at address through the TURN server: what it reads comes from the peer, what it writes goes to the peer, its local address is the relayed address. The network "tcp" relays over an RFC 6062 TCP connection, which needs a TCP or TLS transport, any other network over a UDP allocation. Closing the conn ends the TURN session.
Click to show internal directories.
Click to hide internal directories.