%%% --------------------------------- %%% @author huangyongxing@yeah.net %%% 节点状态数据结构 %%% --------------------------------- -ifndef(NODE_HRL). -define(NODE_HRL, ok). %% 节点公共信息 -record(node, { id % 节点编号 ,host % 节点host ,port % 节点监听端口 ,node % 节点名 ,cookie % 节点cookie ,num = 0 % 在线数(定期更新) ,state = 0 % 开放状态 0开放 1关闭 }). %% 节点管理器状态 -record(node_mgr, { self_node = #node{} % 本节点状态 ,others = [] % 其他节点 }). -endif.