Documentation ¶
Index ¶
- func DialUDP(network string, laddr *net.UDPAddr, raddr *net.UDPAddr) (*net.UDPConn, error)
- func NewServer(h string, dialer netapi.Proxy) (netapi.Server, error)
- func NewTCPServer(host string, handle func(net.Conn)) (netapi.Server, error)
- func NewUDPServer(host string, opt ...func(u *udpOpt)) (netapi.Server, error)
- func UDPWithHandle(f func(req io.Reader) (resp io.ReadCloser, err error)) func(u *udpOpt)
- func UDPWithListenConfig(n net.ListenConfig) func(u *udpOpt)
- func UDPWithListenFunc(f func(net.PacketConn) error) func(u *udpOpt)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialUDP ¶
DialUDP connects to the remote address raddr on the network net, which must be "udp", "udp4", or "udp6". If laddr is not nil, it is used as the local address for the connection.
func NewTCPServer ¶
NewTCPServer create new TCP listener
func UDPWithHandle ¶
func UDPWithHandle(f func(req io.Reader) (resp io.ReadCloser, err error)) func(u *udpOpt)
func UDPWithListenConfig ¶
func UDPWithListenConfig(n net.ListenConfig) func(u *udpOpt)
func UDPWithListenFunc ¶
func UDPWithListenFunc(f func(net.PacketConn) error) func(u *udpOpt)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.