MCPcopy Index your code
hub / github.com/nodejs/node / test

Function test

test/parallel/test-dgram-reuseport.js:6–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4const dgram = require('dgram');
5
6function test() {
7 const socket1 = dgram.createSocket(options);
8 const socket2 = dgram.createSocket(options);
9 socket1.bind(0, common.mustCall(() => {
10 socket2.bind(socket1.address().port, common.mustCall(() => {
11 socket1.close();
12 socket2.close();
13 }));
14 }));
15}
16
17checkSupportReusePort().then(test, () => {
18 common.skip('The `reusePort` option is not supported');

Callers

nothing calls this directly

Calls 4

createSocketMethod · 0.80
addressMethod · 0.65
closeMethod · 0.65
bindMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…