m/market labResearch, with a record.
Source on GitHub ↗

live.hpp

1#pragma once2#include "itch/replay/replay.hpp"3#include <cstddef>4#include <cstdint>5#include <iosfwd>6#include <string>78namespace itch {9/** Explicit unicast endpoints, expected session and bounded recovery settings. */10struct LiveOptions {11    std::string listen;12    std::string source;13    std::string recovery;14    std::string session;15    uint64_t idle_ms = 5000;16    uint64_t recovery_ms = 3000;17    uint64_t retry_ms = 100;18    size_t max_messages = 100000;19    size_t max_bytes = 16000000;20};2122/** Receive a finite MoldUDP64 unicast session starting at sequence 1 with an empty book.23 * Buffers gaps and requests retransmission before applying later events. Status goes to stderr.24 * output receives CSV rows and may contain a valid prefix on failure; use StagedOutput for25 * publication. Throws std::runtime_error on protocol/book failure, resource limits or lack of26 * progress. Validated against local simulators only; no certified Nasdaq connection or network27 * checkpoints.28 */29Result live(const LiveOptions&, const std::string& target, std::ostream& output, size_t depth,30            bool check_book);31} // namespace itch