MCPcopy
hub / github.com/mongodb/node-mongodb-native / loadSocks

Function loadSocks

src/cmap/connect.ts:477–486  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

475
476let socks: SocksLib | null = null;
477function loadSocks() {
478 if (socks == null) {
479 const socksImport = getSocks();
480 if ('kModuleError' in socksImport) {
481 throw socksImport.kModuleError;
482 }
483 socks = socksImport;
484 }
485 return socks;
486}
487
488async function makeSocks5Connection(options: MakeConnectionOptions): Promise<Stream> {
489 const hostAddress = HostAddress.fromHostPort(

Callers 1

makeSocks5ConnectionFunction · 0.70

Calls 1

getSocksFunction · 0.90

Tested by

no test coverage detected