Node.js module
dgram
The 'node:dgram' module provides an implementation of UDP datagram sockets. It allows sending and receiving UDP packets, creating both IPv4 and IPv6 sockets.
This module is used for lightweight, connectionless communication, such as DNS queries, syslog, and real-time streaming protocols that favor speed over reliability.
Fully supported in Bun
Fully implemented. > 90% of Node.js's test suite passes.
Functions 1
- dgram.createSocket()
Creates a
dgram.Socketobject.
Classes 1
- class dgram.Socket
Encapsulates the datagram functionality.