1.0.1 • Published 8 years ago

res-time v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

res-time NPM version NPM downloads Build Status

Get TCP/socket response time.

Install

$ npm install --save res-time

Usage

const resTime = require('res-time')

resTime({host: '184.87.100.246'})
  .then(time => {
    console.log(time)
    //=> 35.231842 (in millisecond)
  })
  .catch(err => {
    console.log(err.message)
  })

API

resTime(options)

options

host

Type: string Default: localhost

The host to connect.

port

Type: number Default: 80

Host port.

timeout

Type: number Default: 0

Connection timeout.

License

MIT © EGOIST

1.0.1

8 years ago

1.0.0

8 years ago