xref: /third_party/node/test/parallel/test-diagnostics-channel-udp.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst assert = require('assert');
41cb0ef41Sopenharmony_ciconst dgram = require('dgram');
51cb0ef41Sopenharmony_ciconst dc = require('diagnostics_channel');
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ciconst udpSocketChannel = dc.channel('udp.socket');
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ciconst isUDPSocket = (socket) => socket instanceof dgram.Socket;
101cb0ef41Sopenharmony_ci
111cb0ef41Sopenharmony_ciudpSocketChannel.subscribe(common.mustCall(({ socket }) => {
121cb0ef41Sopenharmony_ci  assert.strictEqual(isUDPSocket(socket), true);
131cb0ef41Sopenharmony_ci}));
141cb0ef41Sopenharmony_ciconst socket = dgram.createSocket('udp4');
151cb0ef41Sopenharmony_cisocket.close();
16

Indexes created Thu Nov 07 10:32:03 CST 2024