8#include <initializer_list>
14static const size_t MAX_PACKET_SIZE = 508;
25#ifdef USE_UDP_IPV6_SEND
35 void setup()
override;
48#ifdef USE_UDP_IPV6_SEND
60#ifdef USE_UDP_IPV6_SEND
76#ifdef USE_UDP_IPV6_SEND
Fixed-capacity vector - sized once through init() or try_init(); push_back never reallocates This avo...
void set_poll_warning_(PollStep step, const LogString *what)
void set_ipv4_send(bool ipv4_send)
An instance whose destinations are all IPv6 needs no IPv4 send socket.
float get_setup_priority() const override
std::unique_ptr< socket::UDPSendSocket > send_socket_v6_
const char * listen_address_
FixedVector< SockaddrEntry > sockaddrs_
void set_should_broadcast()
LazyCallbackManager< void(std::span< const uint8_t >)> packet_listeners_
void set_ipv6_send(bool multicast)
This instance has IPv6 destinations; multicast ones also need an egress interface.
bool network_poll_()
One pass of the network poll; true once nothing is left to do.
void set_listen_address(const char *listen_addr)
Multicast group literal; must outlive the component.
std::unique_ptr< socket::UDPSendSocket > broadcast_socket_
void set_broadcast_port(uint16_t port)
void add_listener(F &&listener)
void dump_config() override
const char *const * addresses_
std::unique_ptr< socket::UDPSocket > listen_socket_
void set_addresses(const char *const *addresses)
nullptr-terminated table of addresses; must outlive the component.
void set_listen_port(uint16_t port)
bool send_packet(const std::vector< uint8_t > &buf)
bool send_packet(const uint8_t *data, size_t size)
Returns false if the packet could not be sent to every destination.
constexpr float AFTER_WIFI
For components that should be initialized after WiFi is connected.