net.js 834 B

1234567891011121314151617
  1. var net = require("net");
  2. var promisify = require("./_promisify.js");
  3. var bind = function(c, f) { return f && f.bind(c); };
  4. Object.defineProperties(module.exports, {
  5. Server: { enumerable: true, value: net.Server },
  6. Socket: { enumerable: true, value: net.Socket },
  7. Stream: { enumerable: true, value: net.Stream },
  8. //_createServerHandle: // skipping
  9. //_normalizeArgs: // skipping
  10. //_setSimultaneousAccepts: // skipping
  11. connect: { enumerable: true, value: bind(net, net.connect) },
  12. createConnection: { enumerable: true, value: bind(net, net.createConnection) },
  13. createServer: { enumerable: true, value: bind(net, net.createServer) },
  14. isIP: { enumerable: true, value: bind(net, net.isIP) },
  15. isIPv4: { enumerable: true, value: bind(net, net.isIPv4) },
  16. isIPv6: { enumerable: true, value: bind(net, net.isIPv6) },
  17. });