anchor.diff:  
   sio_opcode(Type) ->
       proplists:get_value(Type, lists:zip(?MESSAGE_TYPES, ?MESSAGE_OPCODES), <<"7">>).
  +
  +with_tmp_metadata(Metadata, Fun, State) ->
  +    OldMetadata = State#user_state.metadata,
  +    case Fun(add_metadata(Metadata, State)) of
  +        {stop, Reason, NewState}   -> {stop, Reason, NewState#user_state{metadata = OldMetadata}};
  +        {reply, Replies, NewState} -> {reply, Replies, NewState#user_state{metadata = OldMetadata}};
  +        {noreply, NewState}        -> {noreply, NewState#user_state{metadata = OldMetadata}}
  +    end.
  
positive.code: -module(flood_session).
  
  -export([init/2, run/2, dispatch/3, handle_socketio/2, handle_event/3, handle_timeout/2, add_metadata/2, get_metadata/2]).
  -export([sample_session/0]).
  
  -record(user_state, {metadata,
  
negative.code:     State#user_state{metadata = Metadata ++ State#user_state.metadata}.
  
  handle_timeout(Name, State) ->
      with_tmp_metadata([{<<"timer">>, Name}],
                        fun(S) ->
                                handle(Name, S#user_state.timeout_handlers, S)
                        end,
                        State).
  
  handle_event(Event, Name, Args, State) ->
      %% FIXME Name and Args should be strings.
      with_tmp_metadata([{<<"event">>, Event}, {<<"event.name">>, Name}, {<<"event.args">>, Args}],
                        fun(S) ->
                                handle(Name, S#user_state.event_handlers, S)
                        end,
                        State).
  
  handle_socketio(SIOMessages, State) when is_list(SIOMessages) ->
      lists:foldr(fun(_, {stop, Reason, NewState}) ->
  