ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
udp_transport.cpp
Go to the documentation of this file.
3#include "udp_transport.h"
4
5namespace esphome::udp {
6
9 PacketTransport::setup();
10 if (!this->providers_.empty() || this->is_encrypted_()) {
11 this->parent_->add_listener([this](std::span<const uint8_t> data) { this->process_(data); });
12 }
13}
14
15void UDPTransport::send_packet(const std::vector<uint8_t> &buf) const { this->parent_->send_packet(buf); }
16} // namespace esphome::udp
void process_(std::span< const uint8_t > data)
Process a received packet.
void send_packet(const std::vector< uint8_t > &buf) const override
ESPHOME_ALWAYS_INLINE bool is_connected()
Return whether the node is connected to the network (through wifi, eth, ...)
Definition util.h:36