Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BandwidthConfig ¶
BandwidthConfig describes the maximum bandwidth that the server can use, in bytes per second.
type Client ¶
type Client interface { TCP(addr string) (netproxy.Conn, error) UDP(addr string) (netproxy.Conn, error) Close() error }
func NewReconnectableClient ¶
func NewReconnectableClient(configFunc func() (*Config, error), connectedFunc func(Client, *HandshakeInfo, int), lazy bool) (Client, error)
NewReconnectableClient creates a reconnectable client. If lazy is true, the client will not connect until the first call to TCP() or UDP(). We use a function for config mainly to delay config evaluation (which involves DNS resolution) until the actual connection attempt.
type Config ¶
type Config struct { ConnFactory ConnFactory ServerAddr net.Addr Auth string TLSConfig TLSConfig QUICConfig QUICConfig BandwidthConfig BandwidthConfig FastOpen bool // contains filtered or unexported fields }
type ConnFactory ¶
type ConnFactory interface {
New(net.Addr) (net.PacketConn, error)
}
type HandshakeInfo ¶
type QUICConfig ¶
type QUICConfig struct { InitialStreamReceiveWindow uint64 MaxStreamReceiveWindow uint64 InitialConnectionReceiveWindow uint64 MaxConnectionReceiveWindow uint64 MaxIdleTimeout time.Duration KeepAlivePeriod time.Duration DisablePathMTUDiscovery bool // The server may still override this to true on unsupported platforms. }
QUICConfig contains the QUIC configuration fields that we want to expose to the user.
Click to show internal directories.
Click to hide internal directories.