rpcClient

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BroadChan        chan *ChanData
	GameServers      map[uint32]*GameServer
	GlobalServerInfo *GameServer
)

Functions

func GlobalServerConnected

func GlobalServerConnected(sID uint32, sHost string, sPort uint32) int32

func Initialize

func Initialize()

func PushMsg2GlobalServer

func PushMsg2GlobalServer(data *ChanData)

func SendMsgToGameServer

func SendMsgToGameServer(svr *GameServer, message interface{}) interface{}

func ServerConnected

func ServerConnected(sID uint32, sHost string, sPort uint32) int32

Types

type ChanData

type ChanData struct {
	MsgData interface{}

	ServerID   uint32
	ServerType DataType
}

type DataType

type DataType uint32
const (
	OneServer DataType = 0
	AllServer DataType = 1
)

type GameServer

type GameServer struct {
	Host string
	Port uint32
	//Conn *grpc.ClientConn
	Url   string
	Fails uint32
}

type MsgType

type MsgType uint32

Jump to

Keyboard shortcuts

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