Skip to main content

Module flags

Module flags 

Source
Expand description

Flag constants for the protocol.

Constants§

ACK_RESPONSE
ACK response flags: to_parent + is_response + is_ack = 0x23
DIRECTION_TO_PARENT
Direction: to parent (1) or to child (0).
ERROR_RESPONSE
Error response flags: to_parent + is_response + is_error = 0x07
IS_ACK
ACK flag: acknowledgment only (1) or full response (0).
IS_ERROR
Error flag: error (1) or ok (0).
IS_RESPONSE
Message type: response (1) or request/event (0).
IS_STREAM
Stream flag: stream chunk (1) or single message (0).
RESERVED_MASK
Reserved bits mask (bits 6-7).
RESPONSE
Response flags: to_parent + is_response = 0x03
STREAM_CHUNK
Stream chunk flags: to_parent + is_response + is_stream = 0x0B
STREAM_END
Stream end flag: final chunk (1) or more coming (0).
STREAM_END_RESPONSE
Stream end flags: to_parent + is_response + is_stream + stream_end = 0x1B

Functions§

has_flag
Check if a specific flag is set.