client

package
v0.0.0-...-68bdf18 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

比较简单,纯同步,支持俩接口:读、写

func CreateClient

func CreateClient(ip string, port int) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Read

func (c *Client) Read(timeout time.Duration, cmdId uint, packet proto.Message) error

收消息,指定消息头、消息PB类型

func (*Client) Send

func (c *Client) Send(cmdId uint, pb proto.Message) error

发消息

Jump to

Keyboard shortcuts

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