#include <OnixS/CME/MDH/testing/MulticastSender.h>
|
| | MulticastTarget (const RealtimeFeedSettings &feedSettings, Messaging::TimeSpan arbitrageDelay=Messaging::TimeSpan{}, ReplayDelayer &delayPolicy=CombinedReplayDelayer::service(), PacketSize packetMaxSize=DefaultMaxPacketSize) |
| | MulticastTarget (const MulticastRecoveryFeedSettings &feedSettings, Messaging::TimeSpan arbitrageDelay=Messaging::TimeSpan{}, ReplayDelayer &delayPolicy=CombinedReplayDelayer::service(), PacketSize packetMaxSize=DefaultMaxPacketSize) |
| | ~MulticastTarget () |
| Threading::Event | send (const void *data, size_t dataSize) |
| void | sendA (const void *data, size_t dataSize) |
| void | sendB (const void *data, size_t dataSize) |
| void | sendPrimary (const void *data, size_t dataSize) |
| void | sendSecondary (const void *data, size_t dataSize) |
| NetFeedRole::Enum | primaryFeed () const noexcept |
| NetFeedRole::Enum | secondaryFeed () const noexcept |
| bool | hasSecondary () const noexcept |
| | MulticastTarget (const MulticastTarget &)=delete |
| MulticastTarget & | operator= (const MulticastTarget &)=delete |
Definition at line 33 of file MulticastSender.h.
◆ MulticastTarget() [1/3]
Initializes the target from realtime multicast feed settings.
- Parameters
-
| feedSettings | Realtime feed settings that define the feed layout and the feed A/feed B multicast connection parameters. |
| arbitrageDelay | Delay applied before sending to the secondary feed when both feeds are configured. |
| delayPolicy | Policy used to implement the secondary feed delay. |
| packetMaxSize | Maximum datagram payload size accepted by this target. |
- Exceptions
-
| std::runtime_error | If the realtime feed layout is unsupported, the primary feed endpoint is not populated, or an arbitrage layout does not provide both feed endpoints. |
◆ MulticastTarget() [2/3]
Initializes the target from multicast recovery feed settings.
- Parameters
-
| feedSettings | Recovery feed settings that define the feed layout and the feed A/feed B multicast connection parameters. |
| arbitrageDelay | Delay applied before sending to the secondary feed when both feeds are configured. |
| delayPolicy | Policy used to implement the secondary feed delay. |
| packetMaxSize | Maximum datagram payload size accepted by this target. |
- Exceptions
-
| std::runtime_error | If the recovery feed layout is unsupported or the primary feed endpoint is not populated. |
◆ ~MulticastTarget()
Leaves joined multicast groups and releases owned multicast clients.
◆ MulticastTarget() [3/3]
◆ hasSecondary()
| bool hasSecondary |
( |
| ) |
const |
|
noexcept |
Indicates whether the configured layout has a secondary feed.
◆ operator=()
◆ primaryFeed()
Returns the feed role used as the primary feed.
◆ secondaryFeed()
Returns the feed role used as the secondary feed.
◆ send()
Sends a datagram to the primary feed and sends to the secondary feed when it is configured.
When the secondary feed is sent asynchronously, the returned future becomes ready after the queued secondary send completes. Otherwise, the returned future is already ready after this method returns.
- Parameters
-
| data | Pointer to the datagram payload. |
| dataSize | Payload size in bytes. |
- Returns
- Completion future for the asynchronous part of the send operation.
- Exceptions
-
| std::runtime_error | If dataSize exceeds this target's packet size limit. |
◆ sendA()
| void sendA |
( |
const void * | data, |
|
|
size_t | dataSize ) |
Sends a datagram to feed A when feed A is configured.
- Parameters
-
| data | Pointer to the datagram payload. |
| dataSize | Payload size in bytes. |
- Exceptions
-
| std::runtime_error | If dataSize exceeds this target's packet size limit. |
◆ sendB()
| void sendB |
( |
const void * | data, |
|
|
size_t | dataSize ) |
Sends a datagram to feed B when feed B is configured.
- Parameters
-
| data | Pointer to the datagram payload. |
| dataSize | Payload size in bytes. |
- Exceptions
-
| std::runtime_error | If dataSize exceeds this target's packet size limit. |
◆ sendPrimary()
| void sendPrimary |
( |
const void * | data, |
|
|
size_t | dataSize ) |
Sends a datagram to the primary feed.
- Parameters
-
| data | Pointer to the datagram payload. |
| dataSize | Payload size in bytes. |
- Exceptions
-
| std::runtime_error | If dataSize exceeds this target's packet size limit. |
◆ sendSecondary()
| void sendSecondary |
( |
const void * | data, |
|
|
size_t | dataSize ) |
Sends a datagram immediately to the secondary feed when it is configured.
- Parameters
-
| data | Pointer to the datagram payload. |
| dataSize | Payload size in bytes. |
- Exceptions
-
| std::runtime_error | If dataSize exceeds this target's packet size limit. |
◆ DefaultMaxPacketSize
Default maximum datagram payload size accepted by a directly constructed multicast target.
Definition at line 38 of file MulticastSender.h.