注释优化
This commit is contained in:
parent
eb8a16956e
commit
2b50df79e9
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue