Skip to main content

Module comm

Module comm 

Source
Expand description

Low-level frame and field encoding helpers.

Structs§

Frame
A parsed length-prefixed frame and the remaining bytes after it.

Traits§

TwsField
TWS field serialization used by make_field.
TwsNullableField
TWS field serialization used by make_field_handle_empty.

Functions§

make_client_handshake
Builds the full API\0 enhanced handshake.
make_field
Encodes a NUL-terminated field.
make_field_handle_empty
Encodes a NUL-terminated field, mapping unset integer/double sentinels to an empty value.
make_initial_msg
Builds the enhanced-handshake message body, including the 4-byte length prefix.
make_msg
Builds a length-prefixed field-based payload.
make_msg_proto
Builds a length-prefixed protobuf payload with a raw 4-byte message id.
read_fields
Splits a payload into NUL-terminated fields, dropping the final empty segment like Python.
read_msg
Reads one complete frame from buf.