You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use LimitListener from "golang.org/x/net/netutil" for the Serve() function, but there is no way to do that. Normally, the Serve() function has a listener param.
...
l, err := net.Listen("tcp", addr)
if err != nil {
return
}
l = netutil.LimitListener(TcpKeepAliveListener(l), MAX_CONN_NUM)
server := &http.Server{Addr: addr, Handler: handler}
err = server.Serve(l)
Maybe we can use like this:
...
l, err := net.Listen("tcp", addr)
if err != nil {
return
}
l = netutil.LimitListener(TcpKeepAliveListener(l), MAX_CONN_NUM)
//server := &http.Server{Addr: addr, Handler: handler}
server := endless.NewServer(addr, handler)
err = server.Serve(l)
Sorry for my broken English.
The text was updated successfully, but these errors were encountered:
I want to use LimitListener from "golang.org/x/net/netutil" for the Serve() function, but there is no way to do that. Normally, the Serve() function has a listener param.
Maybe we can use like this:
Sorry for my broken English.
The text was updated successfully, but these errors were encountered: