Deno.Listener

A generic network listener for stream-oriented protocols.

interface Listener extends AsyncIterable<Conn> {
readonly addr: Addr;
readonly rid: number;
[[Symbol.asyncIterator]](): AsyncIterableIterator<Conn>;
accept(): Promise<Conn>;
close(): void;
}

§Extends

§
AsyncIterable<Conn>
[src]

§Properties

§
readonly addr: Addr
[src]

Return the address of the Listener.

§
readonly rid: number
[src]

Return the rid of the Listener.

§Methods

§
[[Symbol.asyncIterator]](): AsyncIterableIterator<Conn>
[src]
§
accept(): Promise<Conn>
[src]

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

§
close(): void
[src]

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