Documentation
¶
Index ¶
- type Link
- type NetClient
- type NetLink
- func (l *NetLink) Ask(cmd []byte, timeout time.Duration) ([]byte, error)
- func (l *NetLink) Close() error
- func (l *NetLink) First() bool
- func (l *NetLink) Id() int64
- func (l *NetLink) Pipe(pipe io.ReadWriteCloser)
- func (l *NetLink) Read(data []byte) (int, error)
- func (l *NetLink) Running() bool
- func (l *NetLink) Write(data []byte) error
- type Serial
- type SerialLink
- func (l *SerialLink) Ask(cmd []byte, timeout time.Duration) ([]byte, error)
- func (l *SerialLink) Close() error
- func (l *SerialLink) First() bool
- func (l *SerialLink) Id() int64
- func (l *SerialLink) Pipe(pipe io.ReadWriteCloser)
- func (l *SerialLink) Running() bool
- func (l *SerialLink) Write(data []byte) error
- type TcpServer
- type Tunnel
- type UdpLink
- type UdpServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Link ¶
type Link interface { events.EventInterface Id() int64 Write(data []byte) error Close() error Running() bool First() bool //Pipe 透传 Pipe(pipe io.ReadWriteCloser) //Ask 发送指令,接收数据 Ask(cmd []byte, timeout time.Duration) ([]byte, error) }
Link 链接
type NetClient ¶
type NetClient struct { events.EventEmitter // contains filtered or unexported fields }
NetClient 网络链接
type NetLink ¶
type NetLink struct {
// contains filtered or unexported fields
}
NetLink 网络连接
func (*NetLink) Pipe ¶
func (l *NetLink) Pipe(pipe io.ReadWriteCloser)
type Serial ¶
type Serial struct { events.EventEmitter // contains filtered or unexported fields }
Serial 串口
type SerialLink ¶
type SerialLink struct {
// contains filtered or unexported fields
}
SerialLink 串口连接
func (*SerialLink) Pipe ¶
func (l *SerialLink) Pipe(pipe io.ReadWriteCloser)
type TcpServer ¶
type TcpServer struct { events.EventEmitter // contains filtered or unexported fields }
TcpServer TCP服务器
type Tunnel ¶
type Tunnel interface { events.EventInterface Open() error Close() error GetLink(id int64) Link Running() bool }
Tunnel 通道
type UdpLink ¶
type UdpLink struct {
// contains filtered or unexported fields
}
UdpLink UDP链接
func (*UdpLink) Pipe ¶
func (l *UdpLink) Pipe(pipe io.ReadWriteCloser)
type UdpServer ¶
type UdpServer struct { events.EventEmitter // contains filtered or unexported fields }
UdpServer UDP服务器
Click to show internal directories.
Click to hide internal directories.