client

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLUSTER_CLIENT_START_SUCCESS = 2
	CLUSTER_CLIENT_NET_BREAK     = -2
	CLUSTER_CLIENT_START_ERROR   = -3
	CLUSTER_CLIENT_SEND_MESSAGE  = 1
	CLUSTER_CLIENT_SEND_USER     = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterClient

type ClusterClient struct {
	*user.UserLite

	Raddress *net.TCPAddr
	// contains filtered or unexported fields
}

func NewClusterClient1 added in v1.0.2

func NewClusterClient1(raddress *net.TCPAddr) *ClusterClient

func NewClusterClient2

func NewClusterClient2(raddress string) *ClusterClient

func (*ClusterClient) Live

func (this *ClusterClient) Live(address []string) (int, error)

func (*ClusterClient) Start

func (cc *ClusterClient) Start(clusterClientHandleFunc ClusterClientHandleFunc)

func (*ClusterClient) Write

func (this *ClusterClient) Write(msg []byte) (int, error)

type ClusterClientHandleFunc added in v1.0.2

type ClusterClientHandleFunc func(*ClusterClient, *message.Message, int) error

Jump to

Keyboard shortcuts

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