ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
udp_transport.h
Go to the documentation of this file.
1#pragma once
2
3#include "../udp_component.h"
4#ifdef USE_NETWORK
7#include <vector>
8
9namespace esphome::udp {
10
11class UDPTransport : public packet_transport::PacketTransport, public Parented<UDPComponent> {
12 public:
13 void setup() override;
14
15 float get_setup_priority() const override { return setup_priority::AFTER_WIFI; }
16
17 protected:
18 void send_packet(const std::vector<uint8_t> &buf) const override;
19 bool should_send() override;
20 size_t get_max_packet_size() override { return MAX_PACKET_SIZE; }
21};
22
23} // namespace esphome::udp
24
25#endif
Helper class to easily give an object a parent of type T.
Definition helpers.h:1861
void send_packet(const std::vector< uint8_t > &buf) const override
size_t get_max_packet_size() override
float get_setup_priority() const override
constexpr float AFTER_WIFI
For components that should be initialized after WiFi is connected.
Definition component.h:53