MCPcopy
hub / github.com/hapijs/hapi / createConnection

Function createConnection

test/request.js:624–637  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

622
623 let total = 2;
624 const createConnection = function () {
625
626 const client = Net.connect(server.info.port, () => {
627
628 client.write('GET / HTTP/1.1\r\nHost: host\r\n\r\n');
629 client.write('GET / HTTP/1.1\r\nHost: host\r\n\r\n');
630 });
631
632 client.on('data', () => {
633
634 --total;
635 client.destroy();
636 });
637 };
638
639 await new Promise((resolve) => {
640

Callers 1

checkFunction · 0.85

Calls 2

destroyMethod · 0.80
onMethod · 0.65

Tested by

no test coverage detected