anchor.diff:            socket :: port(),
             parse_fun :: mqtt_framing:parse(),
             rpcs = gb_trees:empty() :: gb_tree(),
  +          replay = gb_trees:empty() :: gb_tree(),
             id_counter = 1 :: pos_integer(),
             receiver :: pid(),
             receiver_monitor :: reference()
  
positive.code:             {stop, Reason, {error, connection_error}, S}
      end.
  
  %% For the oft-repeated {next_state, opened, ...}
  -define(OPENED(S), {next_state, opened, S}).
  
  
negative.code:                          self ! {tcp, Sock, More},
                           S2
                   end,
              S4 = resend_or_reset(S3),
              {reply, ok, opened, S4};
          {ok, #connack{ return_code = Else }, _Rest, S1} ->
              E = {connection_refused, Else},
              {stop, E, {error, E}, S1};
  