retry-connection
Retry a tcp connection on a given interval
Last updated 5 years ago by asbjornenge .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install retry-connection 
SYNC missed versions from official npm registry.

retry-connection

This module takes a host and a port and will keep checking that connection on a given interval.

Install

npm install retry-connection

Use

var conn = require('retry-connection')({
    host     : 'some.host',
    port     : 8000,
    interval : 1000, // (default 1000)
    timeout  : 500   // (default 500)
})
conn.on('ready', function() {})
conn.on('issue', function(issue) {})

The module holds internal state about readiness; meaning it will only emit a ready event on initial connection or after an issue has occurred. While the connection keeps being ready, no new ready event is emitted. Issue events however keep being emitted for each failing attempt.

Changelog

1.0.1

  • Added the dependecies to package.json :see_no_evil:

1.0.0

  • Initial release :tada:

enjoy

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 2
This Month 2
Last Day 2
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |