Documentation ¶
Index ¶
- Constants
- Variables
- func DialTCP(ctx context.Context, addr string) (net.Conn, error)
- func DialUDP(address string) (*net.UDPConn, error)
- func ListenLocalUDP(ctx context.Context) (net.PacketConn, error)
- func ListenUDP(ctx context.Context, addr string) (net.PacketConn, error)
- func TlsConfigQuicALPN(config *tls.Config) *tls.Config
- type Conn
- type Dialer
- type TcpConnBound
- type TcpConnBoundHandler
- type Type
- type UdpConnBound
- type UdpConnBoundHandler
Constants ¶
View Source
const DefaultDialTimeout = 10 * time.Second
Variables ¶
WsProxyFuncForTesting this global function used for testing
Functions ¶
func ListenLocalUDP ¶
func ListenLocalUDP(ctx context.Context) (net.PacketConn, error)
ListenLocalUDP create an unconnected udp connection with random local addr
Types ¶
type TcpConnBoundHandler ¶
type UdpConnBound ¶
type UdpConnBound interface {
UdpConn(net.PacketConn) net.PacketConn
}
type UdpConnBoundHandler ¶
type UdpConnBoundHandler func(net.PacketConn) net.PacketConn
func (UdpConnBoundHandler) UdpConn ¶
func (f UdpConnBoundHandler) UdpConn(c net.PacketConn) net.PacketConn
Click to show internal directories.
Click to hide internal directories.