A Network interface enhances a TransportInterface with the ability to open a channel to a remote server.

interface NetInterface {
    close(): Promise<void>;
    onData(listener: ((socket: Channel<Uint8Array>, data: Uint8Array) => void)): Listener;
    openChannel(address: ServerAddress): Promise<Channel<Uint8Array>>;
    supports(type: ChannelType, address?: string): boolean;
}

Hierarchy (view full)

Implemented by

Methods