JayBeams  0.1
Another project to have fun coding.
mold_udp_protocol_constants.hpp
Go to the documentation of this file.
1 #ifndef jb_itch5_mold_udp_protocol_constants_hpp
2 #define jb_itch5_mold_udp_protocol_constants_hpp
3 
4 namespace jb {
5 namespace itch5 {
6 /**
7  * MoldUDP64 protocol constants
8  */
9 namespace mold_udp_protocol {
10 
11 /**
12  * The size of the session_id field, this is the first field of the
13  * header, at offset 0.
14  */
15 constexpr std::size_t session_id_size = 10;
16 
17 /**
18  * The location of the sequence number field within the header.
19  */
20 constexpr std::size_t sequence_number_offset = session_id_size;
21 
22 /**
23  * The location of the block count field within the header.
24  */
25 constexpr std::size_t block_count_offset = sequence_number_offset + 8;
26 
27 /**
28  * The total size of the MoldUDP64 header.
29  */
30 constexpr std::size_t header_size = block_count_offset + 2;
31 
32 } // namespace mold_udp_protocol
33 } // namespace itch5
34 } // namespace jb
35 
36 #endif // jb_itch5_mold_udp_protocol_constants_hpp
constexpr std::size_t sequence_number_offset
The location of the sequence number field within the header.
constexpr std::size_t session_id_size
The size of the session_id field, this is the first field of the header, at offset 0...
constexpr std::size_t header_size
The total size of the MoldUDP64 header.
constexpr std::size_t block_count_offset
The location of the block count field within the header.
The top-level namespace for the JayBeams library.
Definition: as_hhmmss.hpp:7