aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-dgram-oob-buffer.js
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2016-01-29 14:18:27 +0100
committerMatteo Collina <hello@matteocollina.com>2016-01-29 19:26:44 +0100
commit137f53c7b72ff9cb36694d058136344076661f4a (patch)
treeb5dd2bad2463b37ff541726ad1f272e21920f212 /test/parallel/test-dgram-oob-buffer.js
parent4126441013bb569c19417f4a23c5f6b3bc38ef2b (diff)
downloadandroid-node-v8-137f53c7b72ff9cb36694d058136344076661f4a.tar.gz
android-node-v8-137f53c7b72ff9cb36694d058136344076661f4a.tar.bz2
android-node-v8-137f53c7b72ff9cb36694d058136344076661f4a.zip
dgram: support dgram.send with multiple buffers
Added ability to dgram.send to send multiple buffers, _writev style. The offset and length parameters in dgram.send are now optional. Refactored the dgram benchmarks, and seperated them from net. Added docs for the new signature. Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Fixes: https://github.com/nodejs/node/issues/4302 PR-URL: https://github.com/nodejs/node/pull/4374
Diffstat (limited to 'test/parallel/test-dgram-oob-buffer.js')
-rw-r--r--test/parallel/test-dgram-oob-buffer.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/parallel/test-dgram-oob-buffer.js b/test/parallel/test-dgram-oob-buffer.js
index 6d0626fc2d..88a28a757b 100644
--- a/test/parallel/test-dgram-oob-buffer.js
+++ b/test/parallel/test-dgram-oob-buffer.js
@@ -4,7 +4,6 @@
// recvfrom(). Node should not propagate this error to the user.
var common = require('../common');
-var assert = require('assert');
var dgram = require('dgram');
var socket = dgram.createSocket('udp4');
@@ -18,23 +17,4 @@ socket.send(buf, 3, 1, common.PORT, '127.0.0.1', ok);
// Since length of zero means nothing, don't error despite OOB.
socket.send(buf, 4, 0, common.PORT, '127.0.0.1', ok);
-assert.throws(function() {
- socket.send(buf, 0, 5, common.PORT, '127.0.0.1', common.fail);
-});
-assert.throws(function() {
- socket.send(buf, 2, 3, common.PORT, '127.0.0.1', common.fail);
-});
-assert.throws(function() {
- socket.send(buf, 4, 4, common.PORT, '127.0.0.1', common.fail);
-});
-assert.throws(function() {
- socket.send('abc', 4, 1, common.PORT, '127.0.0.1', common.fail);
-});
-assert.throws(function() {
- socket.send('abc', 0, 4, common.PORT, '127.0.0.1', common.fail);
-});
-assert.throws(function() {
- socket.send('abc', -1, 2, common.PORT, '127.0.0.1', common.fail);
-});
-
socket.close(); // FIXME should not be necessary