is-tcp-on

0.1.2 • Public • Published

is-tcp-on

check whether a tcp server could be connected

installation

npm i is-tcp-on

usage

var isTcpOn = require('is-tcp-on');
isTcpOn({
    port: 80,
    host: '127.0.0.1',
    timeout: 1000 // optional, default is 1000ms
})
.then(function () {
    // tcp server exists
}, function () {
    // can not connect to this tcp server
});

/is-tcp-on/

    Package Sidebar

    Install

    npm i is-tcp-on

    Weekly Downloads

    2

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • undozen