pyrlang.dist_proto.flags

Distribution flags, named and valued as in OTP’s lib/kernel/include/dist.hrl (the header wins where the docs differ).

pyrlang.dist_proto.flags.DFLAG_PUBLISHED = 1

Visible or hidden node.

pyrlang.dist_proto.flags.DFLAG_ATOM_CACHE = 2

Supports atoms sent in batches.

pyrlang.dist_proto.flags.DFLAG_EXTENDED_REFERENCES = 4

The node supports encoding/decoding of external references.

pyrlang.dist_proto.flags.DFLAG_DIST_MONITOR = 8

The node supports remote monitoring for processes.

pyrlang.dist_proto.flags.DFLAG_DIST_MONITOR_NAME = 32

The node supports remote monitoring for named processes.

pyrlang.dist_proto.flags.DFLAG_EXTENDED_PIDS_PORTS = 256

The node supports encoding/decoding of external pids and ports.

pyrlang.dist_proto.flags.DFLAG_BIT_BINARIES = 1024

The node supports incomplete trailing byte in binaries.

pyrlang.dist_proto.flags.DFLAG_NEW_FLOATS = 2048

The node supports 8-byte double encoding as IEEE-double.

pyrlang.dist_proto.flags.DFLAG_INTERNAL_TAGS = 32768

Used internally by ETS compressed option in Erlang/OTP.

pyrlang.dist_proto.flags.DFLAG_MAP_TAG = 131072

The node can handle map encoding.

pyrlang.dist_proto.flags.DFLAG_BIG_CREATION = 262144

The node can handle NEW_PID, NEW_PORT and NEWER_REFERENCE.

pyrlang.dist_proto.flags.DFLAG_NO_MAGIC = 2097152

Internal for pending connection (BEAM VM internal).

pyrlang.dist_proto.flags.DFLAG_EXIT_PAYLOAD = 4194304

The node supports additional payload for exit messages, DOP_PAYLOAD_MONITOR_P_EXIT, DOP_PAYLOAD_EXIT_TT, DOP_PAYLOAD_EXIT otherwise DOP_MONITOR_P_EXIT, DOP_EXIT_TT, DOP_EXIT are used.

pyrlang.dist_proto.flags.DFLAG_FRAGMENTS = 8388608

The node supports fragmentation for large packets.

pyrlang.dist_proto.flags.DFLAG_HANDSHAKE_23 = 16777216

The node supports the connection setup handshake (version 6) introduced in OTP 23. Mandatory since OTP 25.

The link protocol with UNLINK_ID/UNLINK_ID_ACK (OTP 23.3). Mandatory since OTP 26.

pyrlang.dist_proto.flags.DFLAG_MANDATORY_25_DIGEST = 67108864

Shorthand for all of MANDATORY_DFLAGS_25 (OTP 25). The docs say 1 bsl 36; dist.hrl has this value, and bit 36 is DFLAG_LOCAL_EXT.

pyrlang.dist_proto.flags.DFLAG_RESERVED = 4160749568

Bits of the first flag word that have no meaning yet.

pyrlang.dist_proto.flags.DFLAG_SPAWN = 4294967296

SPAWN_REQUEST, SPAWN_REPLY and their _TT variants (OTP 23).

pyrlang.dist_proto.flags.DFLAG_NAME_ME = 8589934592

The initiator asks the acceptor for a dynamic node name (OTP 23).

pyrlang.dist_proto.flags.DFLAG_V4_NC = 17179869184

32-bit pid id/serial, 64-bit ports, references of up to 5 words (OTP 24). Mandatory since OTP 26.

pyrlang.dist_proto.flags.DFLAG_ALIAS = 34359738368

Process aliases: ALIAS_SEND, ALIAS_SEND_TT (OTP 24).

pyrlang.dist_proto.flags.DFLAG_LOCAL_EXT = 68719476736

LOCAL_EXT terms; only used inside one node (OTP 26).

pyrlang.dist_proto.flags.DFLAG_ALTACT_SIG = 137438953472

ALTACT_SIG_SEND: alias, priority, named and exit signals (OTP 28).

pyrlang.dist_proto.flags.DFLAG_NATIVE_RECORDS = 274877906944

Native records, RECORD_EXT (OTP 29).

pyrlang.dist_proto.flags.MANDATORY_DFLAGS_25 = 17239956

Flags a peer must have since OTP 25.

pyrlang.dist_proto.flags.MANDATORY_DFLAGS_26 = 17213423616

Flags that became mandatory in OTP 26.

pyrlang.dist_proto.flags.DFLAGS_MANDATORY = 17230663572

Every flag an OTP 26-29 node requires of its peer.

pyrlang.dist_proto.flags.DEFAULT_DFLAGS = 468282470332

Default flags value represents current Pyrlang library features as a combination of feature bits.

pyrlang.dist_proto.flags.expand_mandatory_25(flags)

Replace the shorthand DFLAG_MANDATORY_25_DIGEST in a peer’s flags with the flags it stands for (dist_util:expand_mandatory_25_flag/1).

pyrlang.dist_proto.flags.missing_mandatory(flags, mandatory=17230663572)

Names of the mandatory flags absent from a peer’s flags, lowest bit first (dist_util:check_mandatory/3). Expand the digest flag first.

class pyrlang.dist_proto.flags.DistributionFlags(cookie, dflags=468282470332, net_ticktime=60, max_fragmented_size=268435456, dist_buf_busy_limit=1048576, recv_backlog_messages=10000, recv_backlog_bytes=33554432)

Bases: object

A class holding an integer with features that are supported by this node, and the network cookie.

max_fragmented_size_

Most bytes of unfinished fragmented messages held per connection; a peer that exceeds it is disconnected.

dist_buf_busy_limit_

Bytes waiting to be sent on one connection above which senders that await wait; OTP’s +zdbbl (dist_buf_busy_limit), whose default is the same.

recv_backlog_bytes_

Messages, and their bytes, that one connection may have in process inboxes before reading from it pauses.

network_tick_time_

Seconds; OTP’s kernel parameter net_ticktime. A tick is sent every quarter of it on an idle connection, and a peer silent for this long (plus up to a quarter) is considered down. Connected nodes should use the same value.

set_node_published()

Announce the node as visible (not hidden).