dist.epmd module¶
The module represents EPMD connection and implements the protocol. EPMD is a daemon application, part of Erlang/OTP which registers Erlang nodes on the local machine and helps nodes finding each other.
-
class
pyrlang.dist.epmd.
EPMDClient
(engine: pyrlang.async_support.base_engine.BaseEngine)¶ Bases:
object
An EPMD client connection which registers ourselves in EPMD and can do other queries.
-
alive2
(dist) → bool¶ Send initial hello (ALIVE2) to EPMD
Parameters: dist (pyrlang.dist.distribution.ErlangDistribution) -- The distribution object from the node Return type: bool
-
close
()¶ Closing EPMD connection removes the node from available EPMD nodes list.
-
connect
() → bool¶ Establish a long running connection to EPMD, will not return until the connection has been established.
Return type: True
-
engine_
= None¶ Pluggable async event engine (like gevent or asyncio)
-
host_
= None¶ The local EPMD is always located on the local host.
-
query_node
(node: str) → tuple¶ Query EPMD about the port to the given node.
Parameters: node -- String with node "name@ip" or "name@hostname" Returns: Host and port where the node is, or None Return type: tuple(str, int) Throws EPMDClientError: if something is wrong with input Throws EPMDConnectionError: if connection went wrong
-