implement a experimental keepalive feature
Merge pull request #116 from noric/feature/keepalive

implement a experimental keepalive feature #115