各种有用的erlang行为
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

19 lignes
282 B

il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
  1. -module(pong2).
  2. -behavior(gen_srv).
  3. -compile([export_all, nowarn_export_all]).
  4. start() ->
  5. gen_srv:start(?MODULE, 0, []).
  6. init(_Args) ->
  7. {ok, 0}.
  8. handleCall(ping, _State, _From) ->
  9. {reply, pong}.
  10. handleCast(_Msg, _State) ->
  11. kpS.
  12. handleInfo(_Msg, _State) ->
  13. kpS.