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

Function cb

test/parallel/test-dgram-msgsize.js:32–39  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

30const sock = dgram.createSocket('udp4');
31sock.send(buf, 0, buf.length, 12345, '127.0.0.1', common.mustCall(cb));
32function cb(err) {
33 assert(err instanceof Error);
34 assert.strictEqual(err.code, 'EMSGSIZE');
35 assert.strictEqual(err.address, '127.0.0.1');
36 assert.strictEqual(err.port, 12345);
37 assert.strictEqual(err.message, 'send EMSGSIZE 127.0.0.1:12345');
38 sock.close();
39}

Calls 2

closeMethod · 0.65
assertFunction · 0.50

Tested by 6

testFunction · 0.56
testFunction · 0.56
testFunction · 0.56
testFunction · 0.56
testFunction · 0.56
testFunction · 0.56