ping-pong

Low level and abstract KeepAlive-like structure.

npm install ping-pong
12 downloads in the last day
25 downloads in the last week
117 downloads in the last month

ping-pong Build Status Code Climate Dependency Status

Low level and abstract KeepAlive-like structure.

Installation

npm install ping-pong

API

See source code for more details and parameter explaination.

PingPong

a, b, c, d, e Int: a, b, (c, d -> *), (e, d -> *) -> timer

pong

a timer: a -> a

clear

a timer: a -> a

Debug Mode

Uses debug, e.g.:

DEBUG=ping-pong node foo.js

ping-pong start {"intervalMs":10,"retryLimit":0} +1ms
ping-pong > ping +0ms
ping-pong < pong +1ms
ping-pong > ping +10ms
ping-pong < pong +0ms
ping-pong > ping +10ms
ping-pong drop +11ms
ping-pong retry limit reached +0ms
ping-pong stop +0ms
npm loves you