Documentation
¶
Index ¶
- func Compress(c net.Conn) (net.Conn, error)
- func CustomConnCloser(c net.Conn, close func() error) net.Conn
- func Dial(netaddr string) (net.Conn, error)
- func Dumper(c net.Conn, hexdump ...bool) net.Conn
- func EnableKeepAlive(c net.Conn)
- func IsTimeout(err error) bool
- func Listen(netaddr string) (net.Listener, error)
- func NopConnCloser(c net.Conn) net.Conn
- func Relay(local, remote net.Conn) error
- type CompressConn
- type Pipe
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomConnCloser ¶
CustomConnCloser returns a net.Conn from c and the close policy handler.
func EnableKeepAlive ¶
EnableKeepAlive enables keep alive if the connection allows it.
func NopConnCloser ¶
NopConnCloser returns a Conn with a no-op Close method wrapping the provided Conn c.
Types ¶
type CompressConn ¶
A CompressConn is able to compress/decompress a net Conn by using zstandard codec. It does not close its given net.Conn.
type Pipe ¶
type Pipe struct {
// contains filtered or unexported fields
}
A Pipe pipes two net.Conn.
func NewPipeTCP ¶
NewPipeTCP returns a new Pipe by opening a new TCP connection on remote.
func (*Pipe) RemoteConn ¶
RemoteConn returns the remote connection.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.