Beispiel #1
0
func RegisterModule(addr string, maxConnNum int, maxDataLen int) {
	c := new(console)
	c.addr = addr
	c.maxConnNum = maxConnNum
	c.maxDataLen = maxDataLen
	module.Register(c)
}
Beispiel #2
0
func RegisterModule() {
	gw := new(gateway)
	gw.addr = ":" + strconv.Itoa(config.DataSetting.GatewayPort)
	gw.maxConnNum = config.DataSetting.MaxOnlineNum
	gw.headLen = config.DataSetting.HeadLen
	gw.msgIDLen = config.DataSetting.MsgIDLen
	gw.maxDataLen = config.DataSetting.MaxDataLen
	gw.agants = concurrent.NewConcurrentMap(config.DataSetting.MaxOnlineNum)
	module.Register(gw)
	globalGW = gw
}
Beispiel #3
0
func RegisterModule() {
	module.Register(words(wds))
}