18 #ifndef DATA_FEED_HANDLERS_ECHO_HPP
19 #define DATA_FEED_HANDLERS_ECHO_HPP
21 #include "data_feed/receiver.hpp"
41 Echo(std::ostream& stream_ = std::cout) : stream(stream_) { }
49 stream << message << std::endl;
50 stream << receiver->
get_book() << std::endl;
59 stream << message << std::endl;
60 stream << receiver->
get_book() << std::endl;
69 stream << message << std::endl;
70 stream << receiver->
get_book() << std::endl;
79 stream << message << std::endl;
80 stream << receiver->
get_book() << std::endl;
89 stream << message << std::endl;
90 stream << receiver->
get_book() << std::endl;
99 stream << message << std::endl;
100 stream << receiver->
get_book() << std::endl;
108 #endif // DATA_FEED_HANDLERS_ECHO_HPP
A multi-cast receiver for recreating a LOB::LimitOrderBook from network messages.
Definition: receiver.hpp:36
A message that indicates a market order matches with a limit order.
Definition: messages.hpp:387
void did_receive(Receiver< Echo > *receiver, const Messages::DeleteOrder &message)
Handle a delete order message.
Definition: echo.hpp:88
void did_receive(Receiver< Echo > *receiver, const Messages::Trade &message)
Handle a trade message.
Definition: echo.hpp:98
A message that indicates a limit order was added to the book.
Definition: messages.hpp:332
const LOB::LimitOrderBook & get_book()
Return the limit order book for this receiver.
Definition: receiver.hpp:214
A message that indicates the end of a trading session.
Definition: messages.hpp:506
A message that indicates to clear all orders in the order book.
Definition: messages.hpp:213
void did_receive(Receiver< Echo > *receiver, const Messages::EndOfSession &message)
Handle an end of session message.
Definition: echo.hpp:58
A message that indicates the start of a trading session.
Definition: messages.hpp:460
Logic for sending and receiving messages on a financial data feed.
Definition: heartbeat.hpp:28
void did_receive(Receiver< Echo > *receiver, const Messages::Clear &message)
Handle a clear book message.
Definition: echo.hpp:68
A Receiver handler that writes every message to an output stream.
Definition: echo.hpp:31
void did_receive(Receiver< Echo > *receiver, const Messages::AddOrder &message)
Handle an add order message.
Definition: echo.hpp:78
Echo(std::ostream &stream_=std::cout)
Initialize a new data feed echo handler.
Definition: echo.hpp:41
void did_receive(Receiver< Echo > *receiver, const Messages::StartOfSession &message)
Handle a start of session message.
Definition: echo.hpp:48
A message that indicates a limit order was added to the book.
Definition: messages.hpp:259