anchor.diff:      State#user_state{metadata = Metadata ++ State#user_state.metadata}.
   
   handle_timeout(Name, State) ->
  -    %% TODO Define Name as a temporary metadata.
  -    handle(Name, State#user_state.timeout_handlers, State).
  -
  -handle_event(Name, Args, State) ->
  -    %% TODO Define Name & Args as a temporary metadata.
  -    handle(Name, State#user_state.event_handlers, 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}) ->
  
positive.code:       [[{<<"op">>, <<"on_event">>},
          {<<"name">>, <<"comet_error">>},
          {<<"do">>, [[{<<"op">>, <<"log">>},
                       {<<"format">>, <<"Received an error ~p. Aborting">>},
                       {<<"params">>, [<<"$event">>]}],
                      [{<<"op">>, <<"terminate">>},
                       {<<"reason">>, <<"Error!">>}]]}],
         [{<<"op">>,<<"on_socketio">>},
  
negative.code: 
  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.
  