1 #ifndef jb_itch5_process_buffer_mlist_hpp 2 #define jb_itch5_process_buffer_mlist_hpp 29 template <
typename message_handler,
typename... message_types>
40 template <
typename message_handler>
55 message_handler& handler,
57 std::size_t msgoffset,
char const* msgbuf, std::size_t msglen) {
58 handler.handle_unknown(
74 template <
typename message_handler,
typename head_t,
typename... tail_t>
91 message_handler& handler,
93 std::size_t msgoffset,
char const* msgbuf, std::size_t msglen) {
95 if (msgbuf[0] == head_t::message_type) {
100 handler.handle_message(recv_ts, msgcnt, msgoffset, msg);
105 handler, recv_ts, msgcnt, msgoffset, msgbuf, msglen);
112 #endif // jb_itch5_process_buffer_mlist_hpp static T r(std::size_t size, void const *msg, std::size_t offset)
Read a single message or field.
clock_type::time_point time_point
A convenience alias for clock_type::time_point.
static void process(message_handler &handler, typename message_handler::time_point const &recv_ts, std::uint64_t msgcnt, std::size_t msgoffset, char const *msgbuf, std::size_t msglen)
Always call handle_unknown(), as the message type list is empty.
Process a buffer with a single message: parse it and call the handler.
static void process(message_handler &handler, typename message_handler::time_point const &recv_ts, std::uint64_t msgcnt, std::size_t msgoffset, char const *msgbuf, std::size_t msglen)
If any of the message types in the list matches the contents of the buffer call handle_message() for ...
The top-level namespace for the JayBeams library.