keep-in-touch

0.1.0 • Public • Published

usage

var kt = new KeepInTouch({
  lostInterval: 1000
})
 
kt.connected(function () {
  console.log('connected')
})
 
kt.lost(function () {
  console.log('lost connection')
})
 
kt.every(5000, function () {
  console.log('connection lasts for another 5s')
})
 
// call kt.touch() at your frequency
setInterval(function () {
  kt.touch()
}, 800)

Readme

Keywords

none

Package Sidebar

Install

npm i keep-in-touch

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • ygjack