MCPcopy Create free account
hub / github.com/forwardemail/superagent / createUnixConnection

Method createUnixConnection

src/node/http2wrapper.js:68–80  ·  view source on GitHub ↗
(authority, options)

Source from the content-addressed store, hash-verified

66 }
67
68 createUnixConnection(authority, options) {
69 switch (this.protocol) {
70 case 'http:':
71 return net.connect(options.socketPath);
72 case 'https:':
73 options.ALPNProtocols = ['h2'];
74 options.servername = this.host;
75 options.allowHalfOpen = true;
76 return tls.connect(options.socketPath, options);
77 default:
78 throw new Error('Unsupported protocol', this.protocol);
79 }
80 }
81
82 setNoDelay(bool) {
83 // We can not use setNoDelay with HTTP/2.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected