From 2b50df79e91a0e06b5843121423196f910b7ce2b Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Sat, 20 May 2023 10:45:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/options.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/options.go b/server/options.go index 6c23474..05e6917 100644 --- a/server/options.go +++ b/server/options.go @@ -135,6 +135,7 @@ func WithMessageBufferSize(size int) Option { // WithMultiCore 通过特定核心数量运行服务器,默认为单核 // - count > 1 的情况下,将会有对应数量的 goroutine 来处理消息 // - 注意:HTTP和GRPC网络模式下不会生效 +// - 在需要分流的场景推荐采用多核模式,如游戏以房间的形式进行,每个房间互不干扰,这种情况下便可以每个房间单独维护数据包消息进行处理 func WithMultiCore(count int) Option { return func(srv *Server) { srv.core = count