dist_proto.distribution module

Distribution class is a separate running Task which owns its TCP connection.

class pyrlang.dist_proto.distribution.ErlangDistribution(node_name: str)

Bases: object

Implements network part of the EPMD registration and Erlang dist_proto protocol.

async connect_to_node(local_node: str, remote_node: str) → bool

Query EPMD where is the node, and initiate dist connection.

  • local_node -- name of the local Erlang Node object

  • remote_node -- String with node 'name@ip'


boolean whether the connection succeeded

creation_ = None

Creation id used in pid generation. EPMD gives creation id to newly connected nodes.

disconnect_epmd() → None

Finish EPMD connection, this will remove the node from the list of available nodes on EPMD

node_name_ = None

Node name, a string.

async run_dist_server()
async start_distribution() → bool
  1. Starts local Erlang distribution server on a random port

  2. Looks up EPMD daemon and connects to it trying to discover other

    Erlang nodes.

async start_server()

Start listening for incoming connections.