Documentation ¶
Overview ¶
Created by xuzhuoxi on 2019-03-23. @author xuzhuoxi
Created by xuzhuoxi on 2019-04-02. @author xuzhuoxi
Created by xuzhuoxi on 2019-02-18. @author xuzhuoxi
Created by xuzhuoxi on 2019-02-19. @author xuzhuoxi
Index ¶
- Constants
- Variables
- func ForeachExtensionConstructor(eachFunc func(constructor GameExtensionConstructor))
- func HandleBuffDecodeFromPool(handler func(encodingx.IBuffDecoder))
- func HandleBuffEncodeFromPool(handler func(encodingx.IBuffEncoder))
- func HandleBuffToBlockFromPool(handler func(bytex.IBuffToBlock))
- func HandleBuffToDataFromPool(handler func(bytex.IBuffToData))
- func HandleJsonCodingFromPool(handler func(codingHandler encodingx.ICodingHandler))
- func RegisterExtension(constructor GameExtensionConstructor)
- type GameExtensionConstructor
- type IGameExtension
- type IGameExtensionContainer
- type IGameSingleCase
- type IGameSingleCaseSetter
- type ILoginServer
- type IServerSockState
Constants ¶
Variables ¶
View Source
var ( AddressProxy = netx.NewIAddressProxy() //uid与address的交叉映射,整个game模块共享 DataBlockHandler = bytex.NewDefaultDataBlockHandler() //数据封包处理 )
View Source
var ( // block(带长度的[]byte) -> []byte PoolBuffToData = bytex.NewPoolBuffToData() // []byte -> block(带长度的[]byte) PoolBuffToBlock = bytex.NewPoolBuffToBlock() // Gob序列化与反序列化 // 暂时用于通知Route的对象序列化与反序列 PoolBuffEncoder = lang.NewObjectPoolSync() PoolBuffDecoder = lang.NewObjectPoolSync() // Json序列化与反序列化 // 暂时用于Extension的对象序列化与反序列化 PoolJsonCodingHandler = lang.NewObjectPoolSync() // 用于记录日志:Extension响应时间 LoggerExtension = logx.NewLogger() )
Functions ¶
func ForeachExtensionConstructor ¶
func ForeachExtensionConstructor(eachFunc func(constructor GameExtensionConstructor))
func HandleBuffDecodeFromPool ¶
func HandleBuffDecodeFromPool(handler func(encodingx.IBuffDecoder))
func HandleBuffEncodeFromPool ¶
func HandleBuffEncodeFromPool(handler func(encodingx.IBuffEncoder))
func HandleBuffToBlockFromPool ¶
func HandleBuffToBlockFromPool(handler func(bytex.IBuffToBlock))
func HandleBuffToDataFromPool ¶
func HandleBuffToDataFromPool(handler func(bytex.IBuffToData))
func HandleJsonCodingFromPool ¶
func HandleJsonCodingFromPool(handler func(codingHandler encodingx.ICodingHandler))
func RegisterExtension ¶
func RegisterExtension(constructor GameExtensionConstructor)
Types ¶
type GameExtensionConstructor ¶
type GameExtensionConstructor func() IGameExtension
type IGameExtension ¶
type IGameExtension interface { protox.IProtocolExtension IGameSingleCaseSetter }
type IGameExtensionContainer ¶
type IGameExtensionContainer = protox.IProtocolExtensionContainer
func NewGameExtensionContainer ¶
func NewGameExtensionContainer() IGameExtensionContainer
type IGameSingleCase ¶
type IGameSingleCase interface { logx.ILoggerGetter logx.ILoggerSetter Init() }
type IGameSingleCaseSetter ¶
type IGameSingleCaseSetter interface {
SetSingleCase(singleCase IGameSingleCase)
}
type ILoginServer ¶
type ILoginServer interface { //登录 Login() //登出 Logout() }
type IServerSockState ¶
type IServerSockState interface { //服务器运行时间(秒) GetPassSecond() int64 //服务器详细状态 GetSockStateDetail() imodule.ISockStateDetail //服务器简单状态 GetSockState() imodule.SockState }
Click to show internal directories.
Click to hide internal directories.