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.

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, and unix_dgram. Takes an optional callback which is added as a listener for message events.
    Parameters:
    {string} type
    {string} listener