port-numbers
Get information on network port numbers and services, based on IANA's public listing.
Installation
$ npm install --save port-numbers
Example
var pn = require("port-numbers");
pn.getService(80);
pn.getService(3306);
pn.getService(123, "udp");
pn.getPort('redis');
pn.getPort("postgresql");
pn.getPort('ntp', 'udp');
API
.getService(port[, protocol])
port
Number : the port to lookup. Required.protocol
String : the protocol. Default: tcp
.
.getPort(service[, protocol])
service
String : the service to lookup. Required.protocol
String : the protocol. Default: tcp
.
© silverwind, distributed under BSD licence