From 953ddd82e48dd206cef5ac94456549aed13b3ad5 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 17 Nov 2023 23:25:29 +0100 Subject: Updated 30 files and deleted 2976 files (automated) --- .../node_modules/resolve-alpn/README.md | 60 ---------------------- 1 file changed, 60 deletions(-) delete mode 100644 includes/external/addressbook/node_modules/resolve-alpn/README.md (limited to 'includes/external/addressbook/node_modules/resolve-alpn/README.md') diff --git a/includes/external/addressbook/node_modules/resolve-alpn/README.md b/includes/external/addressbook/node_modules/resolve-alpn/README.md deleted file mode 100644 index a49950c..0000000 --- a/includes/external/addressbook/node_modules/resolve-alpn/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# `resolve-alpn` - -[![Node CI](https://github.com/szmarczak/resolve-alpn/workflows/Node%20CI/badge.svg)](https://github.com/szmarczak/resolve-alpn/actions) -[![codecov](https://codecov.io/gh/szmarczak/resolve-alpn/branch/master/graph/badge.svg)](https://codecov.io/gh/szmarczak/resolve-alpn) - -## API - -### resolveALPN(options, connect = tls.connect) - -Returns an object with an `alpnProtocol` property. The `socket` property may be also present. - -```js -const result = await resolveALPN({ - host: 'nghttp2.org', - port: 443, - ALPNProtocols: ['h2', 'http/1.1'], - servername: 'nghttp2.org' -}); - -console.log(result); // {alpnProtocol: 'h2'} -``` - -**Note:** While the `servername` option is not required in this case, many other servers do. It's best practice to set it anyway. - -**Note:** If the socket times out, the promise will resolve and `result.timeout` will be set to `true`. - -#### options - -Same as [TLS options](https://nodejs.org/api/tls.html#tls_tls_connect_options_callback). - -##### options.resolveSocket - -By default, the socket gets destroyed and the promise resolves.
-If you set this to true, it will return the socket in a `socket` property. - -```js -const result = await resolveALPN({ - host: 'nghttp2.org', - port: 443, - ALPNProtocols: ['h2', 'http/1.1'], - servername: 'nghttp2.org', - resolveSocket: true -}); - -console.log(result); // {alpnProtocol: 'h2', socket: tls.TLSSocket} - -// Remember to destroy the socket if you don't use it! -result.socket.destroy(); -``` - -#### connect - -Type: `Function | AsyncFunction`\ -Default: [`tls.connect`](https://nodejs.org/dist/latest-v16.x/docs/api/tls.html#tls_tls_connect_options_callback) - -**Note:** No matter which function is used (synchronous or asynchronous), it **must** accept a `callback` function as a second argument. The `callback` function gets executed when the socket has successfully connected. - -## License - -MIT -- cgit