ESPHome 2026.1.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 {
10namespace udp {
11
12class UDPTransport : public packet_transport::PacketTransport, public Parented<UDPComponent> {
13 public:
14 void setup() override;
15
16 float get_setup_priority() const override { return setup_priority::AFTER_WIFI; }
17
18 protected:
19 void send_packet(const std::vector<uint8_t> &buf) const override;
20 bool should_send() override;
21 size_t get_max_packet_size() override { return MAX_PACKET_SIZE; }
22};
23
24} // namespace udp
25} // namespace esphome
26#endif
Helper class to easily give an object a parent of type T.
Definition helpers.h:1102
void send_packet(const std::vector< uint8_t > &buf) const override
size_t get_max_packet_size() override
float get_setup_priority() const override
const float AFTER_WIFI
For components that should be initialized after WiFi is connected.
Definition component.cpp:88
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7