%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 { FunctionPrototypeBind, Symbol, } = primordials; const { codes } = require('internal/errors'); const { UDP } = internalBinding('udp_wrap'); const { guessHandleType } = internalBinding('util'); const { isInt32, validateFunction, } = require('internal/validators'); const { UV_EINVAL } = internalBinding('uv'); const { ERR_SOCKET_BAD_TYPE, } = codes; const kStateSymbol = Symbol('state symbol'); let dns; // Lazy load for startup performance. function lookup4(lookup, address, callback) { return lookup(address || '127.0.0.1', 4, callback); } function lookup6(lookup, address, callback) { return lookup(address || '::1', 6, callback); } function newHandle(type, lookup) { if (lookup === undefined) { if (dns === undefined) { dns = require('dns'); } lookup = dns.lookup; } else { validateFunction(lookup, 'lookup'); } if (type === 'udp4') { const handle = new UDP(); handle.lookup = FunctionPrototypeBind(lookup4, handle, lookup); return handle; } if (type === 'udp6') { const handle = new UDP(); handle.lookup = FunctionPrototypeBind(lookup6, handle, lookup); handle.bind = handle.bind6; handle.connect = handle.connect6; handle.send = handle.send6; return handle; } throw new ERR_SOCKET_BAD_TYPE(); } function _createSocketHandle(address, port, addressType, fd, flags) { const handle = newHandle(addressType); let err; if (isInt32(fd) && fd > 0) { const type = guessHandleType(fd); if (type !== 'UDP') { err = UV_EINVAL; } else { err = handle.open(fd); } } else if (port || address) { err = handle.bind(address, port || 0, flags); } if (err) { handle.close(); return err; } return handle; } module.exports = { kStateSymbol, _createSocketHandle, newHandle };