|
@@ -0,0 +1,29 @@
|
|
|
|
+package internal
|
|
|
|
+
|
|
|
|
+import (
|
|
|
|
+ "github.com/name5566/leaf/gate"
|
|
|
|
+ "server/conf"
|
|
|
|
+ "server/game"
|
|
|
|
+ "server/msg"
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+type Module struct {
|
|
|
|
+ *gate.Gate
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (m *Module) OnInit() {
|
|
|
|
+ m.Gate = &gate.Gate{
|
|
|
|
+ MaxConnNum: conf.Server.MaxConnNum,
|
|
|
|
+ PendingWriteNum: conf.PendingWriteNum,
|
|
|
|
+ MaxMsgLen: conf.MaxMsgLen,
|
|
|
|
+ WSAddr: conf.Server.WSAddr,
|
|
|
|
+ HTTPTimeout: conf.HTTPTimeout,
|
|
|
|
+ CertFile: conf.Server.CertFile,
|
|
|
|
+ KeyFile: conf.Server.KeyFile,
|
|
|
|
+ TCPAddr: conf.Server.TCPAddr,
|
|
|
|
+ LenMsgLen: conf.LenMsgLen,
|
|
|
|
+ LittleEndian: conf.LittleEndian,
|
|
|
|
+ Processor: msg.Processor,
|
|
|
|
+ AgentChanRPC: game.ChanRPC,
|
|
|
|
+ }
|
|
|
|
+}
|