Skip to main content

fill_omitted_trade_packet_id_bytes

Function fill_omitted_trade_packet_id_bytes 

Source
pub fn fill_omitted_trade_packet_id_bytes(
    proto_id: u32,
    body: Vec<u8>,
    conn_id: u64,
    serial_no: u32,
) -> Result<Vec<u8>, DecodeError>
Expand description

Fill an omitted FTAPI trade PacketID for public surface adapters.

Raw TCP keeps C++ IsReplayAttack(nConnID, packetID) semantics in the trade handlers. REST/gRPC do not expose a real FTAPI connection to users, so they may submit packetID=(0,0) and let the surface adapter synthesize the current virtual conn_id/serial_no before dispatch.