itch-mold-replay 1.0
Time-accurate NASDAQ TotalView-ITCH 5.0 replay over MoldUDP64
Loading...
Searching...
No Matches
imr::mold::retransmission::Feed Class Reference

MoldUDP64 retransmission server. More...

#include <feed.h>

Classes

struct  Config
 

Public Member Functions

 Feed (const Config &cfg, const PacketBuilder::Config &packet_builder_cfg, std::span< const char > file, const RetransmissionBuffer &retransmission_buffer, int shutdown_fd)
 Constructs and binds the retransmission socket.
 
void start ()
 Runs the event loop, blocking until shutdown_fd becomes readable.
 

Detailed Description

MoldUDP64 retransmission server.

Constructor & Destructor Documentation

◆ Feed()

imr::mold::retransmission::Feed::Feed ( const Config cfg,
const PacketBuilder::Config packet_builder_cfg,
std::span< const char >  file,
const RetransmissionBuffer retransmission_buffer,
int  shutdown_fd 
)
explicit

Constructs and binds the retransmission socket.

Parameters
shutdown_fdfd polled alongside the socket; writing to this will cause start() to exit stopping the event loop. Must be > 0 (0 is reserved for stdin, which epoll rejects with EPERM).
Exceptions
std::invalid_argumentif shutdown_fd <= 0, or if cfg.address is not valid IPv4.
std::system_errorif network resource creation / config fails

Member Function Documentation

◆ start()

void imr::mold::retransmission::Feed::start ( )

Runs the event loop, blocking until shutdown_fd becomes readable.

Dispatches incoming client requests to handle_request().


The documentation for this class was generated from the following file: