Skip to main content
Module

x/deno/js/net.ts>Listener

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface Listener
implements AsyncIterator<Conn>
import { type Listener } from "https://deno.land/x/deno@v0.17.0/js/net.ts";

A Listener is a generic network listener for stream-oriented protocols.

Methods

accept(): Promise<Conn>

Waits for and resolves to the next connection to the Listener.

close(): void

Close closes the listener. Any pending accept promises will be rejected with errors.

addr(): Addr

Return the address of the Listener.

[[Symbol.asyncIterator]](): AsyncIterator<Conn>