MCPcopy Create free account
hub / github.com/nodejs/node / client

Function client

test/parallel/test-h2leak-destroy-session-on-socket-ended.js:65–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 'AAAPAQUAAAABhIJBiqDkHROdCbjwHgeG',
64];
65function client() {
66 const client = tls.connect({
67 port: server.address().port,
68 host: 'localhost',
69 rejectUnauthorized: false,
70 ALPNProtocols: ['h2']
71 }, () => {
72 client.end(Buffer.concat(h2fstStream.map((s) => Buffer.from(s, 'base64'))), common.mustSucceed());
73 });
74
75 client.on('error', (error) => {
76 console.error('Connection error:', error);
77 });
78}

Calls 8

concatMethod · 0.80
connectMethod · 0.65
addressMethod · 0.65
mapMethod · 0.65
endMethod · 0.45
fromMethod · 0.45
onMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected