Ende.listen
function · requires --allow-net
function Ende.listen(options: TcpListenOptions & { transport?: "tcp" }): TcpListenerListen announces on the local transport address.
const listener1 = Ende.listen({ port: 80 })
const listener2 = Ende.listen({ hostname: "192.0.2.1", port: 80 })
const listener3 = Ende.listen({ hostname: "[2001:db8::1]", port: 80 });
const listener4 = Ende.listen({ hostname: "golang.org", port: 80, transport: "tcp" });
Requires allow-net permission.
function · requires --allow-read, --allow-write, --allow-net
function Ende.listen(options: UnixListenOptions & { transport: "unix" }): UnixListenerListen announces on the local transport address.
const listener = Ende.listen({ path: "/foo/bar.sock", transport: "unix" })
Requires allow-read, allow-write and allow-net permission. The
allow-net grant may be scoped to the socket path with
--allow-net=unix:<absolute-path>.
function · experimental · requires --allow-net
function Ende.listen(options: VsockListenOptions & { transport: "vsock" }): VsockListenerListen announces on the local transport address.