interface Deno.ServeTcpOptions
extends ServeOptions<Deno.NetAddr>
Options that can be passed to Deno.serve
to create a server listening on
a TCP port.
Properties Jump to heading
optional
Jump to headingtransport: "tcp"
The transport to use.
optional
Jump to headingport: number = 8000
The port to listen on.
Set to 0
to listen on any available port.
optional
Jump to headinghostname: string = "0.0.0.0"
A literal IP address or host name that can be resolved to an IP address.
Note about 0.0.0.0
While listening 0.0.0.0
works on all platforms,
the browsers on Windows don't work with the address 0.0.0.0
.
You should show the message like server running on localhost:8080
instead of
server running on 0.0.0.0:8080
if your program supports Windows.
optional
Jump to headingreusePort: boolean
Sets SO_REUSEPORT
on POSIX systems.