ITCH 5.0 Market Data Handler 1.0.0
NASDAQ ITCH 5.0 Market Data Feed Handler
Loading...
Searching...
No Matches
b2bits::net::UdpEndpoint Struct Reference

UDP-specific endpoint with local binding address. More...

Detailed Description

UDP-specific endpoint with local binding address.

Extends Endpoint with an additional local IP address field for UDP sockets. This allows specifying which local network interface to bind to when receiving multicast traffic or binding to a specific interface.

The local_ip_ field is used for:

  • Multicast group subscription (join multicast on specific interface)
  • Binding UDP sockets to specific network interfaces
  • Handling multi-homed systems (multiple network interfaces)
Note
Inherits ip_ (remote/multicast address) and port_ from Endpoint
Default local_ip_ is "0.0.0.0" (INADDR_ANY - all interfaces)
Example:
// Multicast endpoint
UdpEndpoint multicast;
multicast.ip_ = "239.1.1.1"; // Multicast group
multicast.port_ = 12345; // Multicast port
multicast.local_ip_ = "192.168.1.10"; // Bind to specific interface
// Default (bind to all interfaces)
UdpEndpoint any_interface;
any_interface.ip_ = "239.2.2.2";
any_interface.port_ = 54321;
// local_ip_ = "0.0.0.0" (default)
std::uint16_t port_
Port number (0-65535, 0 = invalid).
Definition Endpoint.h:50
std::string ip_
IP address (IPv4 or IPv6 as string, e.g., "192.168.1.1" or "::1").
Definition Endpoint.h:49
UDP-specific endpoint with local binding address.
Definition Endpoint.h:112
std::string local_ip_
Local interface IP to bind to (default: "0.0.0.0" = all interfaces).
Definition Endpoint.h:113

#include <core/src/net/Endpoint.h>

Inheritance diagram for b2bits::net::UdpEndpoint:

Public Attributes

std::string local_ip_ { "0.0.0.0" }
 Local interface IP to bind to (default: "0.0.0.0" = all interfaces).
Public Attributes inherited from b2bits::net::Endpoint
std::string ip_
 IP address (IPv4 or IPv6 as string, e.g., "192.168.1.1" or "::1").
std::uint16_t port_ = 0
 Port number (0-65535, 0 = invalid).

Additional Inherited Members

Public Member Functions inherited from b2bits::net::Endpoint
 operator bool () const
 Check if endpoint is valid.
bool operator== (const Endpoint &rhs) const
 Equality comparison operator.
bool operator!= (const Endpoint &rhs) const
 Inequality comparison operator.

Member Data Documentation

◆ local_ip_

std::string b2bits::net::UdpEndpoint::local_ip_ { "0.0.0.0" }

Local interface IP to bind to (default: "0.0.0.0" = all interfaces).


The documentation for this struct was generated from the following file: