Add heartbeat support.
Merge pull request #30 from gseitz/heartbeat

Add heartbeat support.