Documentation ¶
Index ¶
- Variables
- func MACHex2Bytes(mac string) (res []byte, err error)
- type Client
- func (c *Client) Alive() (err error)
- func (c *Client) Challenge() error
- func (c *Client) Close() error
- func (c *Client) Login() (err error)
- func (c *Client) Logout()
- func (c *Client) ReadWithTimeout(b []byte) (err error)
- func (c *Client) Start()
- func (c *Client) WriteWithTimeout(b []byte) (err error)
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMACAddrError = errors.New("invalid mac address") ErrIdentifyError = errors.New("invalid username or password") ErrUnknown = errors.New("login failed: unknown error") )
View Source
var ErrChallengeHeadError = errors.New("challenge receive head is not correct")
Functions ¶
func MACHex2Bytes ¶
MACHex2Bytes convert mac address to bytes, the input mac format should be 2a:1b:4c:fe:a9:e9.
Types ¶
type Client ¶
type Client struct { ChallengeTimes int Count int FailCount int // contains filtered or unexported fields }
func (*Client) ReadWithTimeout ¶
func (*Client) WriteWithTimeout ¶
Click to show internal directories.
Click to hide internal directories.