lib

package
v0.0.0-...-4345fab Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MESSAGE_LEN = ss.MAX_SS_MSG_SIZE //200k
)

Variables

This section is empty.

Functions

func AfterReLoadConfig

func AfterReLoadConfig(pconfig *Config, old_config *FileConfig, new_config *FileConfig)

After ReLoad Config If Need Handle

func CommSet

func CommSet(pconfig *Config) bool

Comm Config Setting

func HandleReportCmd

func HandleReportCmd(pconfig *Config, pmsg *comm.ReportMsg)

func LocalSet

func LocalSet(pconfig *Config) bool

Local Proc Setting

func RecvApplyGroupAuditNotify

func RecvApplyGroupAuditNotify(pconfig *Config, pnotify *ss.MsgCommonNotify)

func RecvBatchOnLineNotify

func RecvBatchOnLineNotify(pconfig *Config, pnotify *ss.MsgCommonNotify, src_serv int)

func RecvChgMemberNotify

func RecvChgMemberNotify(pconfig *Config, preq *ss.MsgCommonNotify)

func RecvCommNotify

func RecvCommNotify(pconfig *Config, pnotify *ss.MsgCommonNotify, src_serv int)

func RecvDelGroupNotify

func RecvDelGroupNotify(pconfig *Config, preq *ss.MsgCommonNotify)

func RecvDispMsg

func RecvDispMsg(pconfig *Config, pdisp *ss.MsgDisp)

func RecvHeartBeatReq

func RecvHeartBeatReq(pconfig *Config, preq *ss.MsgHeartBeatReq, from int)

func RecvKickGroupNotify

func RecvKickGroupNotify(pconfig *Config, pnotify *ss.MsgCommonNotify)

func RecvLoginNotify

func RecvLoginNotify(pconfig *Config, uid int64, src_serv int)

func RecvLogoutNotify

func RecvLogoutNotify(pconfig *Config, uid int64, src_serv int)

func RecvMsg

func RecvMsg(pconfig *Config) int64

func RecvNewMsgNotify

func RecvNewMsgNotify(pconfig *Config, preq *ss.MsgCommonNotify)

func RecvReportCmd

func RecvReportCmd(arg interface{})

func RecvUploadFileNotify

func RecvUploadFileNotify(pconfig *Config, pnotify *ss.MsgCommonNotify, file_server int)

func ReportSyncServer

func ReportSyncServer(arg interface{})

func SendHeartBeatMsg

func SendHeartBeatMsg(arg interface{})

func SendNewMsgNotify

func SendNewMsgNotify(pconfig *Config, pnotify *ss.MsgCommonNotify, target_serv int)

func SendSpecCommNotify

func SendSpecCommNotify(pconfig *Config, disp_target ss.DISP_MSG_TARGET, spec_serv int, pnotify *ss.MsgCommonNotify)

func SendToDisp

func SendToDisp(pconfig *Config, hash_v int64, v interface{}) bool

send to disp hash if hash_v>0 use hash first; or use rand method

func SendToServ

func SendToServ(pconfig *Config, target_serv int, v interface{}) bool

@v only support []byte and *ss.SSMsg

func ServerExit

func ServerExit(pconfig *Config)

func ServerStart

func ServerStart(pconfig *Config)

Main Proc

Types

type Config

type Config struct {
	//comm
	NameSpace      string
	ProcId         int
	ProcName       string
	ConfigFile     string
	Daemon         bool
	FileConfig     *FileConfig
	Comm           *comm.CommConfig
	ReportCmd      string //used for report cmd
	ReportCmdToken int64
	ReportServ     *comm.ReportServ //report to manger
	// contains filtered or unexported fields
}

type FileConfig

type FileConfig struct {
	DispServList []int    `json:"disp_serv_list"`
	LogFile      string   `json:"log_file"`
	ManageAddr   []string `json:"manage_addr"`
	MonitorInv   int      `json:"monitor_inv"` //monitor interval seconds
}

type Msg

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

type UserInfo

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

func GetUserInfo

func GetUserInfo(pconfig *Config, uid int64) *UserInfo

get online user info @return: nil offline; else *user_info

type WorldOnlineUsers

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

Jump to

Keyboard shortcuts

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