Dgram

Node.js dgram module — UDP datagram sockets.

Module: node:dgram Support: Experimental Since: 1.1.0 Docs: Node.js Docs

Static Methods

🟢 createSocket(type, callback)
Creates a UDP socket.

Interface DatagramSocket

A UDP socket for sending and receiving datagrams. Created via dgram.createSocket(); not constructable directly.

Since: 1.1.0 Docs: Node.js Docs

Methods

🟢 bind(port, address, callback)
Binds the socket to an address and port.
🟢 send(msg, offset, length, port, address, callback)
Sends a message on the socket.
🟢 close(callback)
Closes the socket.
🟢 address()
Binds the socket to an address and port.

---