Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConnClosed = errors.New("remote connection is closed")
View Source
var ErrRWSizeDismatch = errors.New("read size not equal to write size")
Functions ¶
This section is empty.
Types ¶
type Forward ¶
type Forward struct {
SrcConn io.ReadWriteCloser
DstConn io.ReadWriteCloser
OnError func(error)
}
func NewForward ¶
func NewForward(dst io.ReadWriteCloser, src io.ReadWriteCloser, onError func(error)) *Forward
func (*Forward) SetErrHandle ¶
type TCPForward ¶
type TCPForward struct {
// addr to listen
ListenAddr string
// target host addr
HostAddr string
// Error Handle
OnError func(error)
}
func NewTCPForward ¶
func NewTCPForward(listenAddr, hostAddr string, onError func(error)) *TCPForward
func (*TCPForward) Start ¶
func (tf *TCPForward) Start() error
Click to show internal directories.
Click to hide internal directories.