注释优化

This commit is contained in:
kercylan98 2023-05-20 10:45:51 +08:00
parent eb8a16956e
commit 2b50df79e9
1 changed files with 1 additions and 0 deletions

View File

@ -135,6 +135,7 @@ func WithMessageBufferSize(size int) Option {
// WithMultiCore 通过特定核心数量运行服务器,默认为单核 // WithMultiCore 通过特定核心数量运行服务器,默认为单核
// - count > 1 的情况下,将会有对应数量的 goroutine 来处理消息 // - count > 1 的情况下,将会有对应数量的 goroutine 来处理消息
// - 注意HTTP和GRPC网络模式下不会生效 // - 注意HTTP和GRPC网络模式下不会生效
// - 在需要分流的场景推荐采用多核模式,如游戏以房间的形式进行,每个房间互不干扰,这种情况下便可以每个房间单独维护数据包消息进行处理
func WithMultiCore(count int) Option { func WithMultiCore(count int) Option {
return func(srv *Server) { return func(srv *Server) {
srv.core = count srv.core = count