mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
The listen function supports passing backlog parameters (#1941)
Co-authored-by: anonymou3 <anonymou3>
This commit is contained in:
@@ -43,7 +43,7 @@ function gateserver.start(handler)
|
|||||||
maxclient = conf.maxclient or 1024
|
maxclient = conf.maxclient or 1024
|
||||||
nodelay = conf.nodelay
|
nodelay = conf.nodelay
|
||||||
skynet.error(string.format("Listen on %s:%d", address, port))
|
skynet.error(string.format("Listen on %s:%d", address, port))
|
||||||
socket = socketdriver.listen(address, port)
|
socket = socketdriver.listen(address, port, conf.backlog)
|
||||||
listen_context.co = coroutine.running()
|
listen_context.co = coroutine.running()
|
||||||
listen_context.fd = socket
|
listen_context.fd = socket
|
||||||
skynet.wait(listen_context.co)
|
skynet.wait(listen_context.co)
|
||||||
|
|||||||
Reference in New Issue
Block a user