pyrlang.dist_proto.client¶
The module implements outgoing TCP dist_proto connection (i.e. initiated by our node to another node with the help of EPMD).
- class pyrlang.dist_proto.client.DistClientProtocol(node_name, peer_name)¶
Bases:
BaseDistProtocolHandles outgoing connections from our to other nodes.
- asked_name_¶
The name message asked the peer for a node name (DFLAG_NAME_ME).
- given_name_: Named | None¶
The name and creation the peer gave; adopted by the node once the cookie has checked out.
- handshake_done_: Future[None]¶
Done when the connection is established; carries the DistributionError if the handshake fails.
- connection_made(transport)¶
The TCP connection is up: send our name.
- connection_lost(exc)¶
The connection ended; a handshake still under way has failed.
- is_pending()¶
True while the handshake runs: our name was sent and the connection is not established yet.
- abandon()¶
Give up this handshake: the peer’s own connection to us is used instead (simultaneous connect).
- on_packet(data)¶
Handle incoming dist_proto packet
- Parameters:
data (bytes) – The packet after the header had been removed
- on_packet_recvstatus(data)¶
The acceptor’s verdict on our name (
dist_util:recv_status).
- on_packet_recvchallenge(data)¶
The peer’s challenge: answer it and challenge the peer.
- on_packet_recvchallenge_ack(data)¶
The peer’s answer to our challenge: the connection is set up if it is right.