1 #ifndef jb_itch5_process_iostream_mlist_hpp 2 #define jb_itch5_process_iostream_mlist_hpp 27 template <
typename message_handler,
typename... message_types>
29 std::size_t msgoffset = 0;
30 for (std::uint64_t msgcnt = 0; is.good(); ++msgcnt) {
38 JB_LOG(
error) <<
"reading length when msgcnt=" << msgcnt
39 <<
", msgoffset=" << msgoffset;
45 constexpr std::size_t maxmsglen = 1L << 16;
47 char msgbuf[maxmsglen];
48 is.read(msgbuf, msglen);
49 auto recv_ts = handler.now();
51 handler, recv_ts, msgcnt, msgoffset, msgbuf, msglen);
59 #endif // jb_itch5_process_iostream_mlist_hpp void process_iostream_mlist(std::istream &is, message_handler &handler)
static T r(std::size_t size, void const *msg, std::size_t offset)
Read a single message or field.
Process a buffer with a single message: parse it and call the handler.
The top-level namespace for the JayBeams library.