Include heartbeat processing into socket