interface Deno.DatagramConn
implements AsyncIterable<[Uint8Array, Addr]>

UNSTABLE: new API, yet to be vetted.

A generic transport listener for message-oriented protocols.

Properties

readonly
addr: Addr

Return the address of the UDPConn.

Methods

receive(p?: Uint8Array): Promise<[Uint8Array, Addr]>

UNSTABLE: new API, yet to be vetted.

Waits for and resolves to the next message to the UDPConn.

send(p: Uint8Array, addr: Addr): Promise<number>

UNSTABLE: new API, yet to be vetted.

Sends a message to the target.

close(): void

UNSTABLE: new API, yet to be vetted.

Close closes the socket. Any pending message promises will be rejected with errors.

[[Symbol.asyncIterator]](): AsyncIterableIterator<[Uint8Array, Addr]>