Documentation
¶
Index ¶
Constants ¶
const (
DefaultConnectionTimeout = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func IsDatagramSized ¶ added in v0.72.3
IsDatagramSized reports whether d produces datagram-sized connections.
Types ¶
type DatagramSized ¶ added in v0.72.3
type DatagramSized interface {
DatagramSized()
}
DatagramSized is implemented by dialers whose connections carry each write in a single datagram, so a write can be rejected when it exceeds the path's datagram budget (e.g. QUIC). Transports without this capability (e.g. WebSocket over TCP) impose no per-write size limit, so the relay client can fall back to them when a datagram-sized transport rejects a write as too large. The capability is advertised per dialer rather than hardcoded, so a new transport only needs to declare whether it is datagram-sized.
type RaceDial ¶
type RaceDial struct {
// contains filtered or unexported fields
}
func NewRaceDial ¶
func (*RaceDial) WithSequential ¶ added in v0.72.3
WithSequential makes Dial try the dialers in order, falling back to the next only when one fails to connect, instead of racing them concurrently.
Mutates the receiver and is not safe for concurrent reconfiguration; a RaceDial is intended to be constructed per dial and discarded.
func (*RaceDial) WithServerName ¶ added in v0.70.5
WithServerName sets a TLS SNI/cert validation override. Used when serverURL contains an IP literal but the cert is issued for a different hostname.
Mutates the receiver and is not safe for concurrent reconfiguration; a RaceDial is intended to be constructed per dial and discarded.