Versions in this module Expand all Collapse all v1 v1.0.0 Dec 19, 2023 Changes in this version + const AccountServerType + const AccountServiceType + const BalanceServerType + const BalanceServiceType + const ClientServiceType + const GameServerType + const GameServiceType + const GateServerType + const GateServiceType + const ManagerServerType + const ManagerServiceType + const MaxServerType + const MaxServiceType + const SessionIdSeqIdBits + const SessionIdSeqIdMask + const SessionIdSrvAreaIdBits + const SessionIdSrvAreaIdMask + const SessionIdSrvAreaOffset + const SessionIdSrvIdBits + const SessionIdSrvIdMask + const SessionIdSrvIdOffset + const SessionIdSrvTypeBits + const SessionIdSrvTypeMask + const SessionIdSrvTypeOffset + const UnknowServerType + const UnknowServiceType + const WorldServerType + const WorldServiceType + var ClientSessionMgrSington = &ClientSessionMgr + var ServerSessionMgrSington = &ServerSessionMgr + var ServiceMgr = &serviceMgr + var SessionAttributeClientSession = &ClientSessionMgr + var SessionAttributeServerInfo = &ServerSessionMgr + var SessionAttributeServiceFlag = &serviceMgr + var SessionAttributeServiceInfo = &serviceMgr + func GetCareServicesBySession(sessionType int32) []int32 + func GetCareSessionsByService(serviceType int32) []int32 + func Register1ToMHandler(h Handler, packetIds ...int) + func RegisterHandler(packetId int, h Handler) + func RegisterRangeHandler(start, end int, h Handler) + func SessionCareService(sessionType, serviceType int32) bool + type ClientSessionMgr struct + func (csm *ClientSessionMgr) Broadcast(packetid int, pack interface{}) + func (csm *ClientSessionMgr) CloseAll() + func (csm *ClientSessionMgr) Count() int + func (csm *ClientSessionMgr) GetSession(srvId int64) *netlib.Session + func (csm *ClientSessionMgr) GetSessions() map[int64]*netlib.Session + func (csm *ClientSessionMgr) RegisteSession(s *netlib.Session) bool + func (csm *ClientSessionMgr) UnregisteSession(s *netlib.Session) bool + type Handler interface + Process func(s *netlib.Session, packetid int, data interface{}, sid int64, ...) error + func GetHandler(packetId int) Handler + type HandlerWrapper func(s *netlib.Session, packetid int, data interface{}, sid int64, ...) error + func (hw HandlerWrapper) Process(s *netlib.Session, packetid int, data interface{}, sid int64, ...) error + type ServerSessionMgr struct + func (ssm *ServerSessionMgr) AddListener(l ServerSessionRegisteListener) ServerSessionRegisteListener + func (ssm *ServerSessionMgr) Broadcast(packetid int, pack interface{}, areaId, srvType int) + func (ssm *ServerSessionMgr) GetServerId(areaId, srvType int) int + func (ssm *ServerSessionMgr) GetServerIdByMaxData(areaId, srvType int) int + func (ssm *ServerSessionMgr) GetServerIds(areaId, srvType int) (ids []int) + func (ssm *ServerSessionMgr) GetSession(areaId, srvType, srvId int) *netlib.Session + func (ssm *ServerSessionMgr) GetSessions(areaId, srvType int) (sessions []*netlib.Session) + func (ssm *ServerSessionMgr) RegisteSession(s *netlib.Session) bool + func (ssm *ServerSessionMgr) UnregisteSession(s *netlib.Session) bool + type ServerSessionRegisteListener interface + OnRegiste func(*netlib.Session) + OnUnregiste func(*netlib.Session) + type ServiceRegisteListener interface + OnRegiste func([]*protocol.ServiceInfo) + OnUnregiste func(*protocol.ServiceInfo) + type SessionId int64 + func NewSessionId(s *netlib.Session) SessionId + func NewSessionIdEx(areaId, srvType, srvId, seq int32) SessionId + func (id *SessionId) Set(sid int64) + func (id SessionId) AreaId() uint32 + func (id SessionId) Get() int64 + func (id SessionId) IsNil() bool + func (id SessionId) SeqId() uint32 + func (id SessionId) SrvId() uint32 + func (id SessionId) SrvType() uint32 + type TxCommSkeleton struct + func (tcs *TxCommSkeleton) GetAreaID() int + func (tcs *TxCommSkeleton) GetSkeletonID() int + func (tcs *TxCommSkeleton) SendCmdToTransNode(tnp *transact.TransNodeParam, c transact.TransCmd) bool + func (tcs *TxCommSkeleton) SendTransResult(parent, me *transact.TransNodeParam, tr *transact.TransResult) bool + func (tcs *TxCommSkeleton) SendTransStart(parent, me *transact.TransNodeParam, ud interface{}) bool