%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; const common = require('../common'); // Skip test in FreeBSD jails if (common.inFreeBSDJail) common.skip('In a FreeBSD jail'); const assert = require('assert'); const net = require('net'); let conns = 0; const clientLocalPorts = []; const serverRemotePorts = []; const client = new net.Socket(); const server = net.createServer((socket) => { serverRemotePorts.push(socket.remotePort); socket.end(); }); server.on('close', common.mustCall(() => { // Client and server should agree on the ports used assert.deepStrictEqual(serverRemotePorts, clientLocalPorts); assert.strictEqual(conns, 2); })); server.listen(0, common.localhostIPv4, connect); function connect() { if (conns === 2) { server.close(); return; } conns++; client.once('close', connect); assert.strictEqual( client, client.connect(server.address().port, common.localhostIPv4, () => { clientLocalPorts.push(client.localPort); }) ); }