A class for multi-casting depth of book messages from a LOB::LimitOrderBook.
More...
#include <sender.hpp>
A class for multi-casting depth of book messages from a LOB::LimitOrderBook.
◆ Sender()
DataFeed::Sender::Sender |
( |
asio::io_context & |
context, |
|
|
const asio::ip::address & |
group, |
|
|
uint16_t |
port |
|
) |
| |
|
inline |
Initialize a new data feed multi-cast server.
- Parameters
-
context | the IO context to run the server on |
group | the multi-cast group address in the range [224.0.0.0, 239.255.255.255] |
port | the port to send the packets to |
◆ get_output_buffer_size()
uint32_t DataFeed::Sender::get_output_buffer_size |
( |
| ) |
const |
|
inline |
Return the current size of the output buffer (number of messages).
- Returns
- the number of message currently in the output buffer
◆ get_sequence()
Return the sequence number at this sender.
- Returns
- the sequence number of the next message to send
◆ group()
asio::ip::address DataFeed::Sender::group |
( |
| ) |
const |
|
inline |
Return the group that this sender is sending to.
- Returns
- the UDP multi-cast group that this sender sends to
◆ port()
uint16_t DataFeed::Sender::port |
( |
| ) |
const |
|
inline |
Return the port this sender is running at.
- Returns
- the UDP port this service is running at
◆ send()
template<class T , typename ... Args>
void DataFeed::Sender::send |
( |
Args &&... |
args | ) |
|
|
inline |
Send a message.
- Template Parameters
-
T | the class of the message to send |
- Parameters
-
...args | the initialization parameters for the object |
◆ set_outbound_interface()
void DataFeed::Sender::set_outbound_interface |
( |
const asio::ip::address_v4 & |
interface | ) |
|
|
inline |
Set the outbound interface for the sender.
- Parameters
-
interface | the IPv4 address of the interface to bind to |
◆ set_ttl()
void DataFeed::Sender::set_ttl |
( |
uint32_t |
ttl | ) |
|
|
inline |
Set the TTL hops for messages rendered by the sender.
- Parameters
-
ttl | the number of hops to limit the multi-cast packets to |
The documentation for this class was generated from the following file: