Added ping/pong support #32

Let me know if this makes sense, it works well enough for my situation. Happy to make changes if need be.