Namespace node.dgram
Datagram sockets are available through require('dgram'). Datagrams are most commonly
handled as IP/UDP messages but they can also be used over Unix domain sockets.
- Defined in: node.dgram.js
Method Summary
| Method Attributes | Method Name and Description |
|---|---|
| static |
node.dgram.createSocket(type, listener)
Creates a datagram socket of the specified types.
|
Method Detail
-
static node.dgram.createSocket(type, listener)Creates a datagram socket of the specified types. Valid types are:
udp4,udp6, andunix_dgram. Takes an optional callback which is added as a listener formessageevents.- Parameters:
- {string} type
- {string} listener