You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

multicast-dns-service-types

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multicast-dns-service-types

Parse and stringify mdns service types


Version published
Weekly downloads
3.2M
decreased by-0.07%
Maintainers
1
Install size
5.46 kB
Created
Weekly downloads
 

Package description

What is multicast-dns-service-types?

The multicast-dns-service-types npm package provides a list of well-known DNS service types for use with multicast DNS (mDNS). It helps in identifying and categorizing various types of services that can be advertised and discovered over a local network using mDNS.

What are multicast-dns-service-types's main functionalities?

Service Type Lookup

This feature allows you to look up details about a specific service type by its name. The code sample demonstrates how to retrieve information about the 'http' service type, including its protocol and description.

const serviceTypes = require('multicast-dns-service-types');

// Lookup a service type by name
const serviceType = serviceTypes['http'];
console.log(serviceType); // Output: { name: 'http', protocol: 'tcp', description: 'Web Site' }

List All Service Types

This feature allows you to list all available service types along with their details. The code sample iterates over all service types and prints their names and corresponding details.

const serviceTypes = require('multicast-dns-service-types');

// List all service types
for (const [key, value] of Object.entries(serviceTypes)) {
  console.log(`${key}: ${JSON.stringify(value)}`);
}

Other packages similar to multicast-dns-service-types

Readme

Source

multicast-dns-service-types

Parse and stringify mdns service types

npm install multicast-dns-service-types

build status

Usage

var types = require('multicast-dns-service-types')

console.log(types.stringify({name: 'http', protocol: 'tcp', subtypes: ['sub1', 'sub2']})) // _http._tcp._sub1._sub2
console.log(types.parse('_http._tcp._sub1._sub2')) // {name: 'http', protocol: 'tcp', subtypes: ['sub1', 'sub2']}

The following shorthands also exist

types.stringify(name, protocol, subtypes)
types.tcp(name, subtypes) // set protocol to tcp
types.udp(name, subtypes) // set protocol to udp

License

MIT

Keywords

FAQs

Package last updated on 12 Apr 2015

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc