|
Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
|
A capture file's bytes: as stored, or decompressed on the fly from .zst (zstd) or .gz (gzip, members back to back included). More...
#include <md_feed/pcap_reader.hpp>
Public Member Functions | |
| CaptureStream (const std::string &path) | |
| Throws std::runtime_error when the file cannot be opened. | |
| ~CaptureStream () | |
| CaptureStream (const CaptureStream &)=delete | |
| CaptureStream & | operator= (const CaptureStream &)=delete |
| size_t | read (uint8_t *dst, size_t size) |
| Fills dst with up to size bytes, short only at the end of the stream or on an error, which error() then names. | |
| const std::string & | error () const noexcept |
| Empty unless reading or decompressing failed: a truncated or corrupt archive. | |
A capture file's bytes: as stored, or decompressed on the fly from .zst (zstd) or .gz (gzip, members back to back included).
Not thread-safe.
Definition at line 90 of file pcap_reader.hpp.
|
inlineexplicit |
Throws std::runtime_error when the file cannot be opened.
Definition at line 93 of file pcap_reader.hpp.
References slick::sim::md_feed::detail::errno_text(), slick::sim::md_feed::detail::has_suffix(), and slick::sim::md_feed::detail::open_shared().
Referenced by CaptureStream(), and operator=().
|
inline |
Definition at line 114 of file pcap_reader.hpp.
|
delete |
References CaptureStream().
|
inlinenodiscardnoexcept |
Empty unless reading or decompressing failed: a truncated or corrupt archive.
Definition at line 142 of file pcap_reader.hpp.
|
delete |
References CaptureStream().
|
inline |
Fills dst with up to size bytes, short only at the end of the stream or on an error, which error() then names.
Definition at line 129 of file pcap_reader.hpp.