feat: add tcpBacklog arg to Deno.listen{Tls} and Deno.serve (#30541)

This commit adds `tcpBacklog` argument to `Deno.listen`,
`Deno.listenTls` and `Deno.serve` APIs.

The argument specifies maximum number of pending connections in the
listen queue, and by default is set to 511. 

Users that expect huge bursts of traffic can customize this
option to a higher value.

Ref https://github.com/denoland/deno/pull/30471
Closes https://github.com/denoland/deno/issues/30388
This commit is contained in:
Bartek Iwańczuk 2025-08-28 09:43:20 +02:00 committed by GitHub
parent 9dbcd025d6
commit da1bf978f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 49 additions and 15 deletions

View file

@ -936,6 +936,7 @@ function serveInner(options, handler) {
port: options.port ?? 8000,
reusePort: options.reusePort ?? false,
loadBalanced: options[kLoadBalanced] ?? false,
backlog: options.backlog,
};
if (options.certFile || options.keyFile) {