Is there a way to query the name table that epmd daemon manages?
The nodes() function isn't very helpful on that front.
NOTE: I am looking for an API aside from parsing the output generated through stdout.
Is there a way to query the name table that epmd daemon manages?
The nodes() function isn't very helpful on that front.
NOTE: I am looking for an API aside from parsing the output generated through stdout.
要查询EPMD可见节点,请致电:
EpmdModule = net_kernel:epmd_module(). % erl_epmd by default
EpmdModule:names().
可以连接节点及其端口的列表:
erlang:system_info(dist).
erlang:system_info(dist_ctrl).
第一次调用返回你的表崩溃转储格式。 如果你有兴趣在获取实际的端口,使用第二个。
你这样做会得到相同的答案,捷思锐的代码:
net_adm:names()
我不知道这是否是做与否的一个更标准的方式。