1.0.1 • Published 8 years ago
res-time v1.0.1
res-time
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