• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3const assert = require('assert');
4const dgram = require('dgram');
5const dc = require('diagnostics_channel');
6
7const udpSocketChannel = dc.channel('udp.socket');
8
9const isUDPSocket = (socket) => socket instanceof dgram.Socket;
10
11udpSocketChannel.subscribe(common.mustCall(({ socket }) => {
12  assert.strictEqual(isUDPSocket(socket), true);
13}));
14const socket = dgram.createSocket('udp4');
15socket.close();
16