res-time
v1.0.1
Published
Get TCP/socket response time.
Downloads
9
Readme
res-time
![Build Status](https://img.shields.io/circleci/project/egoist/res-time/master.svg)
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