Versions in this module Expand all Collapse all v0 v0.11.0 Mar 7, 2020 v0.10.0 Jan 31, 2020 v0.9.0 Dec 23, 2019 Changes in this version + func UseDriver(driver DeviceDriver) + type Addr interface + Network func() string + String func() string + type Conn interface + Close func() error + LocalAddr func() Addr + Read func(b []byte) (n int, err error) + RemoteAddr func() Addr + SetDeadline func(t time.Time) error + SetReadDeadline func(t time.Time) error + SetWriteDeadline func(t time.Time) error + Write func(b []byte) (n int, err error) + func Dial(network, address string) (Conn, error) + type DeviceDriver interface + ConnectSSLSocket func(addr, port string) error + ConnectTCPSocket func(addr, port string) error + ConnectUDPSocket func(addr, sendport, listenport string) error + DisconnectSocket func() error + GetDNS func(domain string) (string, error) + IsSocketDataAvailable func() bool + ReadSocket func(b []byte) (n int, err error) + Response func(timeout int) ([]byte, error) + StartSocketSend func(size int) error + Write func(b []byte) (n int, err error) + var ActiveDevice DeviceDriver + type IP []byte + func ParseIP(s string) IP + func (ip IP) String() string + type SerialConn struct + Adaptor DeviceDriver + func (c *SerialConn) Close() error + func (c *SerialConn) Read(b []byte) (n int, err error) + func (c *SerialConn) SetDeadline(t time.Time) error + func (c *SerialConn) SetReadDeadline(t time.Time) error + func (c *SerialConn) SetWriteDeadline(t time.Time) error + func (c *SerialConn) Write(b []byte) (n int, err error) + type TCPAddr struct + IP IP + Port int + Zone string + func ResolveTCPAddr(network, address string) (*TCPAddr, error) + func (a *TCPAddr) Network() string + func (a *TCPAddr) String() string + type TCPSerialConn struct + func DialTCP(network string, laddr, raddr *TCPAddr) (*TCPSerialConn, error) + func NewTCPSerialConn(c SerialConn, laddr, raddr *TCPAddr) *TCPSerialConn + func (c *TCPSerialConn) LocalAddr() Addr + func (c *TCPSerialConn) RemoteAddr() Addr + type UDPAddr struct + IP IP + Port int + Zone string + func ResolveUDPAddr(network, address string) (*UDPAddr, error) + func (a *UDPAddr) Network() string + func (a *UDPAddr) String() string + type UDPSerialConn struct + func DialUDP(network string, laddr, raddr *UDPAddr) (*UDPSerialConn, error) + func ListenUDP(network string, laddr *UDPAddr) (*UDPSerialConn, error) + func NewUDPSerialConn(c SerialConn, laddr, raddr *UDPAddr) *UDPSerialConn + func (c *UDPSerialConn) LocalAddr() Addr + func (c *UDPSerialConn) RemoteAddr() Addr