Documentation ¶
Index ¶
- Variables
- func ConnWithAddr(conn net.Conn, localAddr, remoteAddr net.Addr) net.Conn
- func ConnWithCloser(conn net.Conn, closer func() error) net.Conn
- func Dial(ctx context.Context, dialer bridge.Dialer, network, address string) (net.Conn, error)
- func IsAcceptTimeoutError(err error) bool
- func IsClosedConnError(err error) bool
- func IsServerClosedError(err error) bool
- func Listen(ctx context.Context, listener bridge.ListenConfig, network, address string) (net.Listener, error)
- func NewCommandDialContext(ctx context.Context, commandDialer bridge.CommandDialer, ...) (net.Conn, error)
- func NewCommandListener(ctx context.Context, commandDialer bridge.CommandDialer, localAddr net.Addr, ...) (net.Listener, error)
- func NewNetAddr(network, address string) net.Addr
- type Addr
- type VirtualNetwork
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAcceptTimeout = errors.New("i/o timeout")
View Source
var ErrClosedConn = errors.New("use of closed network connection")
View Source
var ErrServerClosed = errors.New("server closed")
Functions ¶
func IsAcceptTimeoutError ¶
IsAcceptTimeoutError reports whether err is an error from use of a accept timeout.
func IsClosedConnError ¶
IsClosedConnError reports whether err is an error from use of a closed network connection.
func IsServerClosedError ¶
IsServerClosedError reports whether err is an error from server closed.
func NewCommandDialContext ¶
func NewCommandListener ¶
func NewNetAddr ¶
Types ¶
type VirtualNetwork ¶
type VirtualNetwork struct {
// contains filtered or unexported fields
}
func (*VirtualNetwork) Addr ¶
func (l *VirtualNetwork) Addr() net.Addr
func (*VirtualNetwork) Close ¶
func (l *VirtualNetwork) Close() error
Click to show internal directories.
Click to hide internal directories.