Skip to content

Commit

Permalink
fix:main redeclared in this block
Browse files Browse the repository at this point in the history
  • Loading branch information
aceld committed Aug 15, 2024
1 parent 63f206c commit 3cff52b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/zinx_RequestPollMode/NoPoolModeServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import (
"fmt"
"time"

"github.com/aceld/zinx/zconf"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)

// 如果不使用对象池模式则可以直接传递但是产生大量的 Request 对象
Expand All @@ -28,11 +26,13 @@ func NoPoll4(request ziface.IRequest) {
request.Set("num", 3)
}

/*
func main() {
// 开启 Request 对象池模式
// 关闭 Request 对象池模式
server := znet.NewUserConfServer(&zconf.Config{RouterSlicesMode: true, TCPPort: 8999, Host: "127.0.0.1", RequestPoolMode: false})
server.AddRouterSlices(1, NoPoll1)
server.AddRouterSlices(2, NoPoll4)
server.Serve()
}
*/

0 comments on commit 3cff52b

Please sign in to comment.