Documentation
¶
Index ¶
- func NewDefaultBind(controlFns []func(network, address string, c syscall.RawConn) error, ...) conn.Bind
- func NewStdNetBind(controlFns []func(network, address string, c syscall.RawConn) error, ...) wg.Bind
- type Net
- func (net *Net) DialContextTCP(ctx context.Context, addr *net.TCPAddr) (*gonet.TCPConn, error)
- func (net *Net) DialContextTCPAddrPort(ctx context.Context, addr netip.AddrPort) (*gonet.TCPConn, error)
- func (net *Net) DialTCP(addr *net.TCPAddr) (*gonet.TCPConn, error)
- func (net *Net) DialTCPAddrPort(addr netip.AddrPort) (*gonet.TCPConn, error)
- func (net *Net) DialUDP(laddr, raddr *net.UDPAddr) (*gonet.UDPConn, error)
- func (net *Net) DialUDPAddrPort(laddr, raddr netip.AddrPort) (*gonet.UDPConn, error)
- func (net *Net) ListenTCP(addr *net.TCPAddr) (*gonet.TCPListener, error)
- func (net *Net) ListenTCPAddrPort(addr netip.AddrPort) (*gonet.TCPListener, error)
- func (net *Net) ListenUDP(laddr *net.UDPAddr) (*gonet.UDPConn, error)
- func (net *Net) ListenUDPAddrPort(laddr netip.AddrPort) (*gonet.UDPConn, error)
- type StdNetBind
- func (s *StdNetBind) BatchSize() int
- func (s *StdNetBind) Close() error
- func (s *StdNetBind) Open(uport uint16) ([]wg.ReceiveFunc, uint16, error)
- func (*StdNetBind) ParseEndpoint(s string) (wg.Endpoint, error)
- func (s *StdNetBind) Send(bufs [][]byte, endpoint wg.Endpoint) error
- func (s *StdNetBind) SetMark(mark uint32) error
- func (s *StdNetBind) UpdateControlFns(controlFns []func(network, address string, c syscall.RawConn) error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultBind ¶
Types ¶
type Net ¶
type Net netTun
func CreateNetTUN ¶
func (*Net) DialContextTCP ¶
func (*Net) DialContextTCPAddrPort ¶
func (*Net) DialTCPAddrPort ¶
func (*Net) DialUDPAddrPort ¶
func (*Net) ListenTCPAddrPort ¶
type StdNetBind ¶
type StdNetBind struct {
// contains filtered or unexported fields
}
func (*StdNetBind) BatchSize ¶
func (s *StdNetBind) BatchSize() int
TODO: When all Binds handle IdealBatchSize, remove this dynamic function and rename the IdealBatchSize constant to BatchSize.
func (*StdNetBind) Close ¶
func (s *StdNetBind) Close() error
func (*StdNetBind) Open ¶
func (s *StdNetBind) Open(uport uint16) ([]wg.ReceiveFunc, uint16, error)
func (*StdNetBind) ParseEndpoint ¶
func (*StdNetBind) ParseEndpoint(s string) (wg.Endpoint, error)
func (*StdNetBind) SetMark ¶
func (s *StdNetBind) SetMark(mark uint32) error
func (*StdNetBind) UpdateControlFns ¶
func (s *StdNetBind) UpdateControlFns(controlFns []func(network, address string, c syscall.RawConn) error)
Click to show internal directories.
Click to hide internal directories.