Interface IListener<Address, Connection>

a listener for connections

interface IListener<
    Address,
    Connection extends IConnection<Address> = IConnection<Address>,
> {
    accept: () => Promise<Connection>;
    address: null | Address;
    close: () => void;
}

Type Parameters

Hierarchy (View Summary)

Implemented by

Properties

Properties

accept: () => Promise<Connection>

accept a new connection

address: null | Address

address of the listener (if available)

close: () => void

Close the underlying source.