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

Source Files