1.0.10 • Published 10 years ago

udp-finder v1.0.10

Weekly downloads
16
License
MIT
Repository
github
Last release
10 years ago

udp-finder

##Installation

$ npm install udp-finder

##Usage

var udpFinder = require('udp-finder');
var basePort = 3000; //port search starts from 3000
var portAmount = 5; //5 available ports to search for

udpFinder.getPort(basePort, function(err, port){
  //
  //`port` will be an available port
  //
  //
});

udpFinder.getPorts(portAmount, basePort, function(err, ports){
  //
  //`ports` will be an array of available ports 
  //
  //
});

basePort is where udp-finder starts its search from. For basePort, it can take in object in this form {port: 3000}, or it can just be a port number(e.g. 3000). portAmount is the number of available ports to search for. Note that the udp-finder only search for udp4 for now.

##Purpose udp-finder will be useful to those who wants to search for a available udp4 port on the local machine.

##Run Test

$ cd node_modules/udp-finder
$ npm install
$ npm test

####Author : Jake Lin

####License: MIT

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago