anchor.diff:      {keep_state_and_data,
        [{next_event, {call, {self(), undefined}},
          {application_data, iolist_to_binary(Data)}}]};
  -connection(info, Msg, StateData) -> 
  -    handle_info(Msg, ?FUNCTION_NAME, StateData).
  +?HANDLE_COMMON.
  +
   %%--------------------------------------------------------------------
   -spec handshake(gen_statem:event_type(),
                     Msg :: term(),
                     StateData :: term()) ->
                            gen_statem:event_handler_result(atom()).
   %%--------------------------------------------------------------------
  -handshake({call, From}, {set_opts, _} = Call, StateData) ->
  -    handle_call(From, Call, ?FUNCTION_NAME, StateData);
  +handshake({call, From}, {set_opts, Opts}, StateData) ->
  +    handle_set_opts(From, Opts, StateData);
   handshake({call, _}, _, _) ->
  +    %% Postpone all calls to the connection state
  +    {keep_state_and_data, [postpone]};
  +handshake(internal, {application_packets,_,_}, _) ->
       {keep_state_and_data, [postpone]};
   handshake(cast, {new_write, WritesState, Version}, 
             #data{connection_states = ConnectionStates0} = StateData) ->
  
positive.code:      StateData#data{connection_states = 
                          ConnectionStates0#{current_write => WritesState},
                     negotiated_version = Version}};
  handshake(internal, {application_packets,_,_}, _) ->
      {keep_state_and_data, [postpone]};
  handshake(info, Msg, StateData) -> 
      handle_info(Msg, ?FUNCTION_NAME, StateData).
  
  %%--------------------------------------------------------------------
  -spec death_row(gen_statem:event_type(),
  
negative.code:             %% smaller than 4 GB, and the distribution will
              %% therefore always have to use {packet,4}
              Len = iolist_size(Data),
              [<<Len:32>>,Data|dist_data(DHandle)]
      end.
  
  
  %% Empty the inbox from distribution ticks - do not let them accumulate
  consume_ticks() ->
      receive tick -> 
              consume_ticks()
  