anchor.diff:  
       error_logger:info_msg("Starting heartbeat generator listening on ~s~n.",[HeartbeatAddress]),
   
  -
       ok = erlzmq:bind(HeartbeatSock, HeartbeatAddress),
       State = #state{heartbeat_sock = HeartbeatSock,
                      heartbeat_interval = Interval,
  
positive.code:          code_change/3]).
  
  -include_lib("eunit/include/eunit.hrl").
  
  -record(state,
          {heartbeat_sock,
  
negative.code: code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  do_send(#state{heartbeat_sock=HeartbeatSock, beat_count=Count, private_key=PrivateKey}=State) ->
      {ok, Hostname} = inet:gethostname(),
      Msg = {[{server, list_to_binary(Hostname)},
              {timestamp, list_to_binary(httpd_util:rfc1123_date())},
              {type, heartbeat}]},
      % JSON encode message
      BodyFrame = jiffy:encode(Msg),
  
      % Send Header (including signed checksum)
      HeaderFrame = ?TIME_IT(pushy_util, signed_header_from_message, (PrivateKey, BodyFrame)),
      pushy_messaging:send_message(HeartbeatSock, [HeaderFrame, BodyFrame]),
      %?debugVal(BodyFrame),
      %error_logger:info_msg("Heartbeat sent: header=~s,body=~s~n",[HeaderFrame, BodyFrame]),
      State#state{beat_count=Count+1}.
  
  %% ------------------------------------------------------------------
  %% Internal Function Definitions
  %% ------------------------------------------------------------------
  