A multi-cast receiver for recreating a LOB::LimitOrderBook from network messages.
More...
#include <receiver.hpp>
|
| Receiver (asio::io_context &io_context, const asio::ip::address &listen, const asio::ip::address &group, uint16_t port, Handler &handler_, bool reuse_enabled=true) |
| Initialize a new data feed receiver. More...
|
|
const LOB::LimitOrderBook & | get_book () |
| Return the limit order book for this receiver. More...
|
|
bool | is_session_active () const |
| Return whether the trading session is active. More...
|
|
const Handler & | get_handler () const |
| Return the handler connected to this feed receiver. More...
|
|
template<typename Handler>
class DataFeed::Receiver< Handler >
A multi-cast receiver for recreating a LOB::LimitOrderBook from network messages.
- Template Parameters
-
Handler | a callback type for handling messages from the receiver |
◆ Receiver()
template<typename Handler >
DataFeed::Receiver< Handler >::Receiver |
( |
asio::io_context & |
io_context, |
|
|
const asio::ip::address & |
listen, |
|
|
const asio::ip::address & |
group, |
|
|
uint16_t |
port, |
|
|
Handler & |
handler_, |
|
|
bool |
reuse_enabled = true |
|
) |
| |
|
inline |
Initialize a new data feed receiver.
- Parameters
-
io_context | the IO context to listen on |
listen | the host address to listen on |
group | the address of the multi-cast address to join |
port | the port to listen for packets on |
handler_ | a callback for handling messages from the receiver |
reuse_enabled | whether reuse is enabled for the listening host |
◆ get_book()
template<typename Handler >
Return the limit order book for this receiver.
- Returns
- a constant reference to this receiver's limit order book
◆ get_handler()
template<typename Handler >
Return the handler connected to this feed receiver.
- Returns
- a reference to the handler associated with this receiver
◆ is_session_active()
template<typename Handler >
Return whether the trading session is active.
- Returns
- true if the trading session has been started by the server
The documentation for this class was generated from the following file: