go_phpserver_client

package module
v0.0.0-...-0118b69 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2016 License: GPL-2.0 Imports: 8 Imported by: 0

README

#go-phpserver-client

Documentation

Index

Constants

View Source
const (
	NET_READ_TIMEOUT = time.Second * 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

go phpserver client

conn net.Conn 客户端连接 async bool 是否使用异步 configName string 配置名称 rpcClass string rpcClass的名称 rpcUri string rpc uri地址 rpcUser string rpc用户名 rpcSecret string rpc秘钥 rpcCompressor string rpc 版本, 暂时没有用处

func New

func New(config *model.Config) (c *Client, err error)

创建客户端

name string 客户端名称, 如 "Example"

func (*Client) Call

func (c *Client) Call(method string, args interface{}) (reply string, err error)

调用对应方法 reply string 返回的是服务端json串

func (*Client) Close

func (c *Client) Close() error

func (*Client) SetClass

func (c *Client) SetClass(name string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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