anchor.diff:                      Socket = socket(State),
                       %% io:format("Sending packet with ~p msgs~n", [length(msg_queue(State))]),
                       {MQueue, OQueue} = msg_queue(State),
  -                    NewSocket =
  -                        send({dest_ip(State), dest_port(State), Socket},
  -                             unpack_msg_bundle, MQueue, OQueue, State),
  -                    T1State = set_socket(State, NewSocket),
  -                    T2State = inc_s_msg_count(T1State),
  -                    T3State = set_msg_queue(T2State, {[], []}),
  -                    T4State = set_msg_queue_len(T3State, 0),
  -                    _T5State = set_msgs_since_bundle_start(T4State, 0);
  +                    send_msg_bundle(State, Socket, MQueue, OQueue, QL);
                   false -> State
               end
       end.
  +
  +-spec send_msg_bundle(state(), inet:socket(),
  +                      MQueue::[{DestPid::pid(), Message::comm:message()}],
  +                      OQueue::[comm:send_options()], QL::pos_integer()) -> state().
  +send_msg_bundle(State, notconnected, MQueue, OQueue, QL) ->
  +    % should not occur often - just in case a new MQueue, OQueue was given:
  +    T1 = set_msg_queue(State, {MQueue, OQueue}),
  +    set_msg_queue_len(T1, QL);
  +send_msg_bundle(State, Socket, MQueue, OQueue, _QL) ->
  +    NewSocket = send({dest_ip(State), dest_port(State), Socket},
  +                     unpack_msg_bundle, MQueue, OQueue, State),
  +    T1State = set_socket(State, NewSocket),
  +    T2State = inc_s_msg_count(T1State),
  +    T3State = set_msg_queue(T2State, {[], []}),
  +    T4State = set_msg_queue_len(T3State, 0),
  +    _T5State = set_msgs_since_bundle_start(T4State,0).
   
   -spec state_new(DestIP::inet:ip_address(), DestPort::comm_server:tcp_port(),
                   LocalListenPort::comm_server:tcp_port(), Channel::main | prio,
  
positive.code:      LastStatReport       :: {RcvCnt::non_neg_integer(), RcvBytes::non_neg_integer(),
                                SendCnt::non_neg_integer(), SendBytes::non_neg_integer()}}.
  -type message() ::
      {send, DestPid::pid(), Message::comm:message()} |
      {tcp, Socket::inet:socket(), Data::binary()} |
      {tcp_closed, Socket::inet:socket()} |
      {report_stats} |
  
negative.code:                             MaxBundle = erlang:max(200, MQL div 100),
                              T1 = set_msg_queue(State, {[{DestPid, Message}], [Options]}),
                              T2 = set_msg_queue_len(T1, 1),
                              % note: need to set the bundle size equal to MQL
                              % -> to process this 1 msg + MQL messages (see below)
                              set_desired_bundle_size(T2, erlang:min(MQL, MaxBundle));
                         true ->
                              NewSocket =
                                  send({dest_ip(State), dest_port(State), Socket},
  