http2.js 992 B

123456789101112131415
  1. var http2 = {};
  2. try { http2 = require("http2"); } catch (e) { }
  3. var promisify = require("./_promisify.js");
  4. var bind = function(c, f) { return f && f.bind(c); };
  5. Object.defineProperties(module.exports, {
  6. Http2ServerRequest: { enumerable: true, value: http2.Http2ServerRequest },
  7. Http2ServerResponse: { enumerable: true, value: http2.Http2ServerResponse },
  8. connect: { enumerable: true, value: bind(http2, http2.connect) },
  9. constants: { enumerable: true, get: function() { return http2.constants; }, set: function(v) { http2.constants = v; } },
  10. createSecureServer: { enumerable: true, value: bind(http2, http2.createSecureServer) },
  11. createServer: { enumerable: true, value: bind(http2, http2.createServer) },
  12. getDefaultSettings: { enumerable: true, value: bind(http2, http2.getDefaultSettings) },
  13. getPackedSettings: { enumerable: true, value: bind(http2, http2.getPackedSettings) },
  14. getUnpackedSettings: { enumerable: true, value: bind(http2, http2.getUnpackedSettings) },
  15. });