interface Deno.Listener
A generic network listener for stream-oriented protocols.
Type Parameters Jump to heading
Jump to headingT extends Conn = Conn
Jump to headingA extends Addr = Addr
Properties Jump to heading
readonly
Jump to headingaddr: A
Return the address of the Listener
.
Methods Jump to heading
Jump to headingaccept(): Promise<T>
Waits for and resolves to the next connection to the Listener
.
Jump to headingclose(): void
Close closes the listener. Any pending accept promises will be rejected with errors.
Jump to heading[[Symbol.asyncIterator]](): AsyncIterableIterator<T>
Jump to headingref(): void
Make the listener block the event loop from finishing.
Note: the listener blocks the event loop from finishing by default.
This method is only meaningful after .unref()
is called.
Jump to headingunref(): void
Make the listener not block the event loop from finishing.