Documentation
¶
Index ¶
- type Server
- type ServerTCP
- type ServerTcpTunnel
- func (l *ServerTcpTunnel) Ask(cmd []byte, timeout time.Duration) ([]byte, error)
- func (l *ServerTcpTunnel) Close() error
- func (l *ServerTcpTunnel) First() bool
- func (l *ServerTcpTunnel) Model() *model.Tunnel
- func (l *ServerTcpTunnel) Open() error
- func (l *ServerTcpTunnel) Pipe(pipe io.ReadWriteCloser)
- func (l *ServerTcpTunnel) Running() bool
- func (l *ServerTcpTunnel) Write(data []byte) error
- type ServerUDP
- type ServerUdpTunnel
- func (l *ServerUdpTunnel) Ask(cmd []byte, timeout time.Duration) ([]byte, error)
- func (l *ServerUdpTunnel) Close() error
- func (l *ServerUdpTunnel) First() bool
- func (l *ServerUdpTunnel) Model() *model.Tunnel
- func (l *ServerUdpTunnel) Open() error
- func (l *ServerUdpTunnel) Pipe(pipe io.ReadWriteCloser)
- func (l *ServerUdpTunnel) Running() bool
- func (l *ServerUdpTunnel) Write(data []byte) error
- type Tunnel
- type TunnelClient
- func (l *TunnelClient) Ask(cmd []byte, timeout time.Duration) ([]byte, error)
- func (client *TunnelClient) Close() error
- func (l *TunnelClient) First() bool
- func (l *TunnelClient) Model() *model.Tunnel
- func (client *TunnelClient) Open() error
- func (l *TunnelClient) Pipe(pipe io.ReadWriteCloser)
- func (client *TunnelClient) Retry()
- func (l *TunnelClient) Running() bool
- func (l *TunnelClient) Write(data []byte) error
- type TunnelSerial
- func (l *TunnelSerial) Ask(cmd []byte, timeout time.Duration) ([]byte, error)
- func (l *TunnelSerial) Close() error
- func (l *TunnelSerial) First() bool
- func (l *TunnelSerial) Model() *model.Tunnel
- func (s *TunnelSerial) Open() error
- func (l *TunnelSerial) Pipe(pipe io.ReadWriteCloser)
- func (s *TunnelSerial) Retry()
- func (l *TunnelSerial) Running() bool
- func (l *TunnelSerial) Write(data []byte) error
- type TunnelTcpServer
- func (l *TunnelTcpServer) Ask(cmd []byte, timeout time.Duration) ([]byte, error)
- func (server *TunnelTcpServer) Close() error
- func (l *TunnelTcpServer) First() bool
- func (l *TunnelTcpServer) Model() *model.Tunnel
- func (server *TunnelTcpServer) Open() error
- func (l *TunnelTcpServer) Pipe(pipe io.ReadWriteCloser)
- func (l *TunnelTcpServer) Running() bool
- func (l *TunnelTcpServer) Write(data []byte) error
- type TunnelUdpServer
- func (server *TunnelUdpServer) Ask(cmd []byte, timeout time.Duration) ([]byte, error)
- func (server *TunnelUdpServer) Close() (err error)
- func (l *TunnelUdpServer) First() bool
- func (l *TunnelUdpServer) Model() *model.Tunnel
- func (server *TunnelUdpServer) Open() error
- func (server *TunnelUdpServer) Pipe(pipe io.ReadWriteCloser)
- func (l *TunnelUdpServer) Running() bool
- func (server *TunnelUdpServer) Write(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶ added in v1.2.1
type Server interface { events.EventInterface Open() error Close() error GetTunnel(id int64) Tunnel Running() bool }
Server 通道
type ServerTCP ¶ added in v1.2.1
type ServerTCP struct { events.EventEmitter // contains filtered or unexported fields }
ServerTCP TCP服务器
type ServerTcpTunnel ¶ added in v1.2.1
type ServerTcpTunnel struct {
// contains filtered or unexported fields
}
ServerTcpTunnel 网络连接
func (*ServerTcpTunnel) Open ¶ added in v1.2.1
func (l *ServerTcpTunnel) Open() error
func (*ServerTcpTunnel) Pipe ¶ added in v1.2.1
func (l *ServerTcpTunnel) Pipe(pipe io.ReadWriteCloser)
type ServerUDP ¶ added in v1.2.1
type ServerUDP struct { events.EventEmitter // contains filtered or unexported fields }
ServerUDP UDP服务器
type ServerUdpTunnel ¶ added in v1.2.1
type ServerUdpTunnel struct {
// contains filtered or unexported fields
}
ServerUdpTunnel UDP链接
func (*ServerUdpTunnel) Close ¶ added in v1.2.1
func (l *ServerUdpTunnel) Close() error
func (*ServerUdpTunnel) Open ¶ added in v1.2.1
func (l *ServerUdpTunnel) Open() error
func (*ServerUdpTunnel) Pipe ¶ added in v1.2.1
func (l *ServerUdpTunnel) Pipe(pipe io.ReadWriteCloser)
func (*ServerUdpTunnel) Write ¶ added in v1.2.1
func (l *ServerUdpTunnel) Write(data []byte) error
Write 写
type Tunnel ¶
type Tunnel interface { events.EventInterface Model() *model.Tunnel Write(data []byte) error Open() error Close() error Running() bool First() bool //Pipe 透传 Pipe(pipe io.ReadWriteCloser) //Ask 发送指令,接收数据 Ask(cmd []byte, timeout time.Duration) ([]byte, error) }
Tunnel 通道
type TunnelClient ¶ added in v1.2.1
type TunnelClient struct {
// contains filtered or unexported fields
}
TunnelClient 网络链接
func (*TunnelClient) Pipe ¶ added in v1.2.1
func (l *TunnelClient) Pipe(pipe io.ReadWriteCloser)
func (*TunnelClient) Retry ¶ added in v1.2.2
func (client *TunnelClient) Retry()
type TunnelSerial ¶ added in v1.2.1
type TunnelSerial struct {
// contains filtered or unexported fields
}
TunnelSerial 串口
func (*TunnelSerial) Pipe ¶ added in v1.2.1
func (l *TunnelSerial) Pipe(pipe io.ReadWriteCloser)
func (*TunnelSerial) Retry ¶ added in v1.2.2
func (s *TunnelSerial) Retry()
type TunnelTcpServer ¶ added in v1.2.1
type TunnelTcpServer struct {
// contains filtered or unexported fields
}
TunnelTcpServer TCP服务器
func (*TunnelTcpServer) Close ¶ added in v1.2.1
func (server *TunnelTcpServer) Close() error
Close 关闭
func (*TunnelTcpServer) Pipe ¶ added in v1.2.1
func (l *TunnelTcpServer) Pipe(pipe io.ReadWriteCloser)
type TunnelUdpServer ¶ added in v1.2.1
type TunnelUdpServer struct {
// contains filtered or unexported fields
}
TunnelUdpServer UDP服务器
func (*TunnelUdpServer) Close ¶ added in v1.2.1
func (server *TunnelUdpServer) Close() (err error)
Close 关闭
func (*TunnelUdpServer) Pipe ¶ added in v1.2.1
func (server *TunnelUdpServer) Pipe(pipe io.ReadWriteCloser)
func (*TunnelUdpServer) Write ¶ added in v1.2.1
func (server *TunnelUdpServer) Write(data []byte) error
Write 写
Click to show internal directories.
Click to hide internal directories.