9static const char *
const TAG =
"udp_transport";
13 PacketTransport::setup();
18#ifdef USE_BINARY_SENSOR
22 this->
parent_->set_should_broadcast();
23 if (!this->
providers_.empty() || this->is_encrypted_()) {
24 this->
parent_->add_listener([
this](std::vector<uint8_t> &buf) { this->
process_(buf); });
29 PacketTransport::update();
std::vector< Sensor > sensors_
std::vector< BinarySensor > binary_sensors_
void process_(const std::vector< uint8_t > &data)
Process a received packet.
std::map< std::string, Provider > providers_
void send_packet(const std::vector< uint8_t > &buf) const override
bool should_send() override
bool is_connected()
Return whether the node is connected to the network (through wifi, eth, ...)
Providing packet encoding functions for exchanging data with a remote host.