Expand description
Buffer management for FIX message creation and manipulation.
This module provides high-performance buffer initialization and management specifically designed for FIX protocol message generation. The core concept is pre-initializing buffers with the fixed header structure that appears in every FIX message.
Constants§
- BEGIN_
STRING_ POS - Position where BeginString starts (always 0).
- BODY_
LENGTH_ VALUE_ POS - Position where BodyLength value starts (the “0000” part).
- FORGE_
BUFFER_ SIZE - Default buffer size for FIX message writing operations. 1024 bytes should accommodate most FIX messages in practice.
- FORGE_
HEADER - The complete pre-initialized header that is baked into every forge buffer. Layout: “8=FIX.4.4\x019=0000\x0135=”
- FORGE_
HEADER_ LEN - Length of the complete pre-initialized header.
- FORGE_
WRITE_ START - Starting position for writing MsgType value after the pre-initialized header. This is where MsgType value writing should begin.
- MSG_
TYPE_ TAG_ POS - Position where MsgType tag starts (“35=”).
Functions§
- forge_
out_ buffer - Create a pre-initialized buffer for FIX message writing.
- update_
body_ length - Update the BodyLength field in a forge buffer with the actual message length.