You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
367 B

'use strict';
var common = require('../common');
var dgram = require('dgram');
var buf = new Buffer(1024);
buf.fill(42);
var socket = dgram.createSocket('udp4');
socket.send(buf, 0, buf.length, common.PORT, 'localhost');
// if close callback is not function, ignore the argument.
socket.close('bad argument');
socket.on('close', common.mustCall(function() {}));