Ai世界玩家人数超过4人测试

This commit is contained in:
flswld
2023-01-10 19:21:56 +08:00
parent 3ecdb6ff70
commit 1793054ef4
22 changed files with 596 additions and 251 deletions

View File

@@ -64,10 +64,11 @@ func NewKcpConnectManager(messageQueue *mq.MessageQueue, discovery *rpc.Discover
r.localMsgOutput = make(chan *ProtoMsg, 1000)
r.createSessionChan = make(chan *Session, 1000)
r.destroySessionChan = make(chan *Session, 1000)
r.run()
return r
}
func (k *KcpConnectManager) Start() {
func (k *KcpConnectManager) run() {
// 读取密钥相关文件
k.signRsaKey, k.encRsaKeyMap, _ = region.LoadRsaKey()
// key
@@ -97,7 +98,7 @@ func (k *KcpConnectManager) Start() {
go k.acceptHandle(listener)
}
func (k *KcpConnectManager) Stop() {
func (k *KcpConnectManager) Close() {
k.closeAllKcpConn()
time.Sleep(time.Second * 3)
}