OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
MulticastTargetOptions Struct Reference

#include <OnixS/CME/MDH/testing/MulticastSender.h>

Public Member Functions

 MulticastTargetOptions ()=default
Messaging::Byte ttl () const noexcept
MulticastTargetOptions & ttl (Messaging::UInt64 value)

Detailed Description

Note
A TTL of zero (the default) confines datagrams to the local host. Multicast loopback remains enabled, so local receivers still receive them. A positive TTL permits transmission beyond the local host and requires the ONIXS_CMEMDH_ALLOW_MULTICAST_EGRESS environment variable to be set to 1, true, yes, or on, ignoring case and surrounding whitespace. Independently of the TTL, outgoing destinations outside 239.0.0.0/8 require ONIXS_CMEMDH_ALLOW_ANY_MULTICAST_DESTINATION to contain one of those true values.

Definition at line 52 of file MulticastSender.h.

Constructor & Destructor Documentation

◆ MulticastTargetOptions()

MulticastTargetOptions ( )
default

Initializes multicast target options with a TTL of zero.

Member Function Documentation

◆ ttl() [1/2]

Messaging::Byte ttl ( ) const
inlinenoexcept

Returns the IPv4 multicast time-to-live.

Returns
Configured TTL value.

Definition at line 60 of file MulticastSender.h.

◆ ttl() [2/2]

Sets the IPv4 multicast time-to-live.

Parameters
valueTTL to apply when multicast clients are constructed.
Returns
This options instance.
Exceptions
std::invalid_argumentIf value is greater than 32.
Note
Supported values are in the range 0 through 32. A positive value requires the ONIXS_CMEMDH_ALLOW_MULTICAST_EGRESS environment variable to contain a boolean true value when a multicast target is constructed.