Socket
Book a DemoInstallSign in
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
npmnpm
Version published
Weekly downloads
179
-44.24%
Maintainers
2
Weekly downloads
 
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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.