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

dns-srv

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dns-srv

A small library to help connect using DNS SRV records on node.js

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

dns-srv

A module to query SRV records from DNS servers

Usage: To query the _xmpp-client._tcp SRV record of gmail.com.

var srv = require('dns-srv');
var net = require('net');

var sock = new net.Stream();
srv.connect(sock // This socket will become connected if everything goes well
         , ['_xmpp-client._tcp'] // The SRV record to query
         , "gmail.com" // The domain whose DNS SRV we are interested in
         , 5222 // Default fallback port to connect to in case SRV lookup failed
);

sock.on('error', function() { console.error('meh...'); })
    .on('connect', function() { console.log('yeah baby!!'); });

FAQs

Package last updated on 08 Jun 2013

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