github.com/lianghucheng/zrddz@v0.0.0-20200923083010-c71f680932e2/src/gate/internal/module.go (about) 1 package internal 2 3 import ( 4 "conf" 5 "game" 6 "msg" 7 8 "github.com/name5566/leaf/gate" 9 ) 10 11 type Module struct { 12 *gate.Gate 13 } 14 15 func (m *Module) OnInit() { 16 m.Gate = &gate.Gate{ 17 MaxConnNum: conf.Server.MaxConnNum, 18 PendingWriteNum: conf.PendingWriteNum, 19 MaxMsgLen: conf.MaxMsgLen, 20 WSAddr: conf.Server.WSAddr, 21 HTTPTimeout: conf.HTTPTimeout, 22 CertFile: conf.Server.CertFile, 23 KeyFile: conf.Server.KeyFile, 24 TCPAddr: conf.Server.TCPAddr, 25 LenMsgLen: conf.LenMsgLen, 26 LittleEndian: conf.LittleEndian, 27 Processor: msg.Processor, 28 AgentChanRPC: game.ChanRPC, 29 } 30 }