blob: 8e2233e9c4daadedc0e2d2807bb656b8779db7b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
'use strict';
require('../common');
var assert = require('assert');
var dgram = require('dgram');
var message = Buffer.from('Some bytes');
var client = dgram.createSocket('udp4');
client.send(
message,
0,
message.length,
41234,
'localhost',
function(err, bytes) {
assert.strictEqual(bytes, message.length);
client.close();
}
);
|