Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resolve-alpn

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-alpn

Detects the ALPN protocol

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is resolve-alpn?

The resolve-alpn npm package is designed to help Node.js applications determine the Application-Layer Protocol Negotiation (ALPN) protocol that a server supports. ALPN is a TLS extension used for negotiating which protocol should be performed over a secure connection. This is particularly useful for applications that need to decide between different protocols like HTTP/2 or HTTP/1.1 when connecting to a server.

What are resolve-alpn's main functionalities?

Determining ALPN protocol

This feature allows developers to programmatically determine the ALPN protocol supported by a server. The code sample demonstrates how to use the resolve-alpn package to check which ALPN protocol ('http/1.1', 'h2', etc.) a server supports by specifying the host and port.

const resolveAlpn = require('resolve-alpn');

resolveAlpn({
  host: 'example.com',
  port: 443
}).then((negotiatedProtocol) => {
  console.log(negotiatedProtocol);
}).catch((error) => {
  console.error(error);
});

Other packages similar to resolve-alpn

Keywords

FAQs

Package last updated on 30 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc