A generic transport listener for message-oriented protocols.
Methods
receive(p?: Uint8Array): Promise<[Uint8Array, Addr]>
Waits for and resolves to the next message to the instance.
Messages are received in the format of a tuple containing the data array and the address information.
send(p: Uint8Array, addr: Addr): Promise<number>
Sends a message to the target via the connection. The method resolves with the number of bytes sent.
[[Symbol.asyncIterator]](): AsyncIterableIterator<[Uint8Array, Addr]>