Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

50 řádky
1.4 KiB

  1. -module({{srvid}}).
  2. -behaviour(gen_server).
  3. -define(SERVER, ?MODULE).
  4. %% ------------------------------------------------------------------
  5. %% API Function Exports
  6. %% ------------------------------------------------------------------
  7. -export([start_link/0]).
  8. %% ------------------------------------------------------------------
  9. %% gen_server Function Exports
  10. %% ------------------------------------------------------------------
  11. -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
  12. terminate/2, code_change/3]).
  13. %% ------------------------------------------------------------------
  14. %% API Function Definitions
  15. %% ------------------------------------------------------------------
  16. start_link() ->
  17. gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
  18. %% ------------------------------------------------------------------
  19. %% gen_server Function Definitions
  20. %% ------------------------------------------------------------------
  21. init(Args) ->
  22. {ok, Args}.
  23. handle_call(_Request, _From, State) ->
  24. {reply, ok, State}.
  25. handle_cast(_Msg, State) ->
  26. {noreply, State}.
  27. handle_info(_Info, State) ->
  28. {noreply, State}.
  29. terminate(_Reason, _State) ->
  30. ok.
  31. code_change(_OldVsn, State, _Extra) ->
  32. {ok, State}.
  33. %% ------------------------------------------------------------------
  34. %% Internal Function Definitions
  35. %% ------------------------------------------------------------------