client

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRespNotMatch = errors.New("the response is not matched with the request")

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(version uint8) *Client

func (*Client) Connect

func (cli *Client) Connect(serverAddr, clientID, secret string, loginMode uint8, timeout time.Duration) error

func (*Client) Disconnect

func (cli *Client) Disconnect()

func (*Client) RecvAndUnpackPkt

func (cli *Client) RecvAndUnpackPkt(timeout time.Duration) (interface{}, error)

func (*Client) SendReqPkt

func (cli *Client) SendReqPkt(packet pkg.Packer) (uint32, error)

func (*Client) SendRspPkt

func (cli *Client) SendRspPkt(packet pkg.Packer, sequenceID uint32) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL