res-time
Get TCP/socket response time.
Last updated 5 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install res-time 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.1                                ...           latest (5 years ago)

2 Versions

  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |