Simple client and server with heartbeat