-
最小库condor用于在Erlang中构建可伸缩的TCP服务器
资源介绍
秃鹰
Condor是在Erlang中构建可伸缩TCP服务器的最小库。
快速概述
- module ( ping_server ).
- behaviour ( condor_listener ).
% % condor_listener callbacks
- export ([ init / 1 ]).
- export ([ handle_packet / 2 ]).
- export ([ handle_info / 2 ]).
- export ([ terminate / 2 ]).
init ([]) ->
{ ok , undefined }.
handle_packet (<< " stop " >>, State ) ->
{ send_and_stop , << " ok " >>, normal , State };
handle_packet (<<