ITCHCPP 1.6.1
High-Performance NASDAQ TotalView-ITCH 5.0 Parser & Market-Data Platform
Loading...
Searching...
No Matches
itch::transport::MoldUdp64Header Struct Reference

The fixed 20-byte header that prefixes every MoldUDP64 downstream packet. More...

#include <moldudp64.hpp>

Public Member Functions

auto session_view () const -> std::string_view
 The session id as a view with trailing padding removed.
 
auto is_heartbeat () const noexcept -> bool
 A heartbeat carries no message blocks (message_count == 0).
 
auto is_end_of_session () const noexcept -> bool
 End-of-session is signalled by the sentinel message_count.
 

Public Attributes

std::array< char, 10 > session {}
 Session id, space padded.
 
std::uint64_t sequence_number {0}
 Sequence of the first message block.
 
std::uint16_t message_count {0}
 Number of message blocks in the packet.
 

Static Public Attributes

static constexpr std::uint16_t END_OF_SESSION = 0xFFFF
 Sentinel message_count indicating an end-of-session packet.
 

Detailed Description

The fixed 20-byte header that prefixes every MoldUDP64 downstream packet.

MoldUDP64 is the lightweight UDP multicast framing NASDAQ uses to disseminate live market data. Each datagram carries a session identifier, the sequence number of the first message it contains, and a count of the message blocks that follow. The message blocks themselves are length-prefixed exactly like a raw ITCH stream, so once the header is stripped the remainder feeds straight into the ordinary Parser framing loop.

Definition at line 34 of file moldudp64.hpp.

Member Function Documentation

◆ session_view()

auto itch::transport::MoldUdp64Header::session_view ( ) const -> std::string_view
inline

The session id as a view with trailing padding removed.

Returns
A view of the session id with trailing spaces/NULs stripped.

Definition at line 44 of file moldudp64.hpp.

References session.

◆ is_heartbeat()

auto itch::transport::MoldUdp64Header::is_heartbeat ( ) const -> bool
inlinenoexcept

A heartbeat carries no message blocks (message_count == 0).

Returns
True if the packet is a heartbeat, false otherwise.

Definition at line 54 of file moldudp64.hpp.

References message_count.

◆ is_end_of_session()

auto itch::transport::MoldUdp64Header::is_end_of_session ( ) const -> bool
inlinenoexcept

End-of-session is signalled by the sentinel message_count.

Returns
True if the packet signals end of session, false otherwise.

Definition at line 58 of file moldudp64.hpp.

References END_OF_SESSION, and message_count.

Member Data Documentation

◆ session

std::array<char, 10> itch::transport::MoldUdp64Header::session {}

Session id, space padded.

Definition at line 35 of file moldudp64.hpp.

Referenced by session_view().

◆ sequence_number

std::uint64_t itch::transport::MoldUdp64Header::sequence_number {0}

Sequence of the first message block.

Definition at line 36 of file moldudp64.hpp.

◆ message_count

std::uint16_t itch::transport::MoldUdp64Header::message_count {0}

Number of message blocks in the packet.

Definition at line 37 of file moldudp64.hpp.

Referenced by is_end_of_session(), and is_heartbeat().

◆ END_OF_SESSION

constexpr std::uint16_t itch::transport::MoldUdp64Header::END_OF_SESSION = 0xFFFF
staticconstexpr

Sentinel message_count indicating an end-of-session packet.

Definition at line 40 of file moldudp64.hpp.

Referenced by is_end_of_session().


The documentation for this struct was generated from the following file: