The listen function supports passing backlog parameters (#1941)

Co-authored-by: anonymou3 <anonymou3>
This commit is contained in:
anonymou3
2024-06-19 14:16:41 +08:00
committed by Cloud Wu
parent dc1980dfc8
commit f214c68ff3

View File

@@ -43,7 +43,7 @@ function gateserver.start(handler)
maxclient = conf.maxclient or 1024
nodelay = conf.nodelay
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.fd = socket
skynet.wait(listen_context.co)