pyrlang.dist_proto.control¶
Messages of an established connection, as pure functions over bytes:
splitting a packet’s content into control message and payload, and
checking the control message’s shape (“Protocol between Connected Nodes” in
erl_dist_protocol). A peer’s bytes are untrusted: everything wrong
raises DistributionError, and the caller closes
that connection.
- pyrlang.dist_proto.control.spawn_options(options)¶
What the option list of a checked
SPAWN_REQUESTasks for.
- pyrlang.dist_proto.control.plain_form(control, message)¶
A checked control message and its payload reduced to the few forms the node acts on: an exit reason sent as payload goes back into the control tuple (24-28 become
EXIT,EXIT2,MONITOR_P_EXIT), trace tokens are dropped (seewithout_token()), and an alternate action signal (37) becomes the send orEXIT2it stands for; its priority is dropped, and the receiver of such anEXIT2may be an alias or a name.
- pyrlang.dist_proto.control.without_token(control)¶
The token-free form of a checked control message: this node does not take part in sequential tracing, so the token of a
_TTmessage is dropped and the message handled as its plain counterpart.
- pyrlang.dist_proto.control.split_message(data, atoms, options)¶
Split a control message with its optional payload into the decoded control term and the payload’s bytes.
- Parameters:
- Returns:
control term, and the encoded payload or None if there is none
- Return type:
- pyrlang.dist_proto.control.decode_payload(payload, atoms, options)¶
The message that follows a control message; nothing may follow it.