• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../common');
4if (!common.hasCrypto)
5  common.skip('missing crypto');
6const h2 = require('http2');
7
8const server = h2.createServer();
9
10// We use the lower-level API here
11server.on('stream', common.mustNotCall());
12
13server.listen(0, common.mustCall(() => {
14  const client = h2.connect(`http://localhost:${server.address().port}`);
15  client.close(common.mustCall(() => server.close()));
16}));
17