anchor.diff:      io:format("Unhandled message: ~p~n", [Any]),
       {noreply, State}.
   
  -%%--------------------------------------------------------------------
  -%% @private
  -%% @doc
  -%% This function is called by a gen_server when it is about to
  -%% terminate. It should be the opposite of Module:init/1 and do any
  -%% necessary cleaning up. When it returns, the gen_server terminates
  -%% with Reason. The return value is ignored.
  -%%
  -%% @spec terminate(Reason, State) -> void()
  -%% @end
  -%%--------------------------------------------------------------------
   terminate(_Reason, _State) ->
       ok.
   
  -%%--------------------------------------------------------------------
  -%% @private
  -%% @doc
  -%% Convert process state when code is changed
  -%%
  -%% @spec code_change(OldVsn, State, Extra) -> {ok, NewState}
  -%% @end
  -%%--------------------------------------------------------------------
   code_change(_OldVsn, State, _Extra) ->
       {ok, State}.
   
  
positive.code:             {reply, {Header, Body}} ->
                  Reply = ucp_utils:compose_message(Header, Body),
                  io:format("Sending UCP reply: ~p~n", [Reply]),
                  gen_tcp:send(Socket, binary:list_to_bin([?STX, Reply, ?ETX]));
              noreply ->
                  ignore
          end
  
negative.code:     case Body#ucp_cmd_60.styp of
          "1" -> % Open session
              % Pass everyone
              % TODO: implement authorization
              {reply, {Header#ucp_header{o_r = "R"}, #short_ack{}}};
          Type -> {error, operation_subtype_not_supported, Type}
      end;
  
  % Reply to other messages with ACK
  process_message({Header = #ucp_header{o_r = "O"} , _Body}) ->
      % slow down reply
      timer:sleep(1000),
      {reply, {Header#ucp_header{o_r = "R"}, #short_ack{}}};
  
  process_message({#ucp_header{o_r = "R"} , _Body}) ->
  