各种有用的erlang行为
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

19 行
282 B

4 年前
4 年前
4 年前
4 年前
4 年前
4 年前
  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.