Sha256: a29d3d834ee9dcb20d4634afebd001a2a3a99828aac4b12fda74d8677b5268b4

Contents?: true

Size: 450 Bytes

Versions: 5

Compression:

Stored size: 450 Bytes

Contents

'use strict';
require('../common');
var assert = require('assert');

var TCP = process.binding('tcp_wrap').TCP;
var uv = process.binding('uv');

var handle = new TCP();

// Should be able to bind to the port
var err = handle.bind('0.0.0.0', 0);
assert.equal(err, 0);

// Should not be able to bind to the same port again
var out = {};
handle.getsockname(out);
err = handle.bind('0.0.0.0', out.port);
assert.equal(err, uv.UV_EINVAL);

handle.close();

Version data entries

5 entries across 4 versions & 1 rubygems

Version Path
node-compiler-0.9.1 vendor/node/test/parallel/test-tcp-wrap.js
node-compiler-0.9.0 vendor/node-v7.2.1/test/parallel/test-tcp-wrap.js
node-compiler-0.8.0 vendor/node-v7.2.0/test/parallel/test-tcp-wrap.js
node-compiler-0.7.0 vendor/node-v6.9.1/test/parallel/test-tcp-wrap.js
node-compiler-0.7.0 vendor/node-v7.1.0/test/parallel/test-tcp-wrap.js