Deno.listenDatagram

UNSTABLE: new API, yet to be vetted

Listen announces on the local transport address.

const listener1 = Deno.listenDatagram({
  port: 80,
  transport: "udp"
});
const listener2 = Deno.listenDatagram({
  hostname: "golang.org",
  port: 80,
  transport: "udp"
});

Requires allow-net permission.

function listenDatagram(options: ListenOptions & {
transport: "udp";
}
): DatagramConn;
function listenDatagram(options: UnixListenOptions & {
transport: "unixpacket";
}
): DatagramConn;
§
listenDatagram(options: ListenOptions & {
transport: "udp";
}
): DatagramConn
[src]

UNSTABLE: new API, yet to be vetted

Listen announces on the local transport address.

const listener1 = Deno.listenDatagram({
  port: 80,
  transport: "udp"
});
const listener2 = Deno.listenDatagram({
  hostname: "golang.org",
  port: 80,
  transport: "udp"
});

Requires allow-net permission.

§Parameters

§
options: ListenOptions & {
transport: "udp";
}
[src]
§
listenDatagram(options: UnixListenOptions & {
transport: "unixpacket";
}
): DatagramConn
[src]

UNSTABLE: new API, yet to be vetted

Listen announces on the local transport address.

const listener = Deno.listenDatagram({
  path: "/foo/bar.sock",
  transport: "unixpacket"
});

Requires allow-read and allow-write permission.

§Parameters

§
options: UnixListenOptions & {
transport: "unixpacket";
}
[src]