func NewClient(d anet.Dialer) (*Client, error) { cli, err := rpc.NewClient(d) if err != nil { return nil, err } return &Client{cli}, nil }
func NewTCPClient(hostport string) (*Client, error) { cli, err := rpc.NewClient(anet.TCPDialer(hostport)) if err != nil { return nil, err } return &Client{cli}, nil }
func NewClient(hostport string) (*Client, error) { rpcCli, err := rpc.NewClient(dialer{hostport}) if err != nil { return nil, err } return &Client{rpcCli}, nil }