anchor.diff:       MsgQueueLen          :: non_neg_integer(),
        DesiredBundleSize    :: non_neg_integer(),
        MsgsSinceBundleStart :: non_neg_integer(),
  -     LastStatReport       :: stat_report()}.
  +     LastStatReport       :: stat_report(),
  +     NumberOfTimeouts	  :: non_neg_integer()}.
   -type message() ::
       {send, DestPid::pid(), Message::comm:message(), Options::comm:send_options()} |
       {tcp, Socket::inet:socket(), Data::binary()} |
  
positive.code:             ?TRACE("~.0p Sent message ~.0p~n",
                     [pid_groups:my_pidname(), Message]),
              ?LOG_MESSAGE_SOCK('send', Message, byte_size(BinaryMessage), channel(State)),
              State;
          {error, closed} ->
              Address = dest_ip(State),
              Port = dest_port(State),
              report_bundle_error(Options, {Address, Port, Pid}, Message,
                                  socket_closed),
              log:log(warn,"[ CC ~p ] sending closed connection", [self()]),
              close_connection(Socket, State);
          {error, timeout} ->
              log:log(error,"[ CC ~p ] couldn't send to ~.0p:~.0p (~.0p). retrying.",
                      [self(), dest_ip(State), dest_port(State), timeout]),
              send_internal(Pid, Message, Options, BinaryMessage, State);
          {error, Reason} ->
              Address = dest_ip(State),
              Port = dest_port(State),
  
negative.code:                                 Reason),
              log:log(error,"[ CC ~p ] couldn't send to ~.0p:~.0p (~.0p). closing connection",
                      [self(), Address, Port, Reason]),
              close_connection(Socket, set_number_of_timeouts(State, 0))
      end.
  
  -spec new_connection(inet:ip_address(), comm_server:tcp_port(),
  