28template <
typename UDPType>
36 return udp.begin(port);
46 bool send(uint8_t* data,
int len)
override {
return send(
peer, data, len); }
51 int sent =
udp.write(data, len);
53 bool result =
udp.endPacket();
63 int packetSize =
udp.parsePacket();
67 char tmp[packetSize + 1] = {0};
68 int len =
udp.readBytes(tmp, packetSize);
Abstract Interface for UDP API.
Definition: IUDPService.h:33
Access to UDP functionality: sending and receiving of data.
Definition: UDPService.h:29
RequestData receive() override
Receive incoming UDP data and peer information.
Definition: UDPService.h:60
bool send(IPAddressAndPort addr, uint8_t *data, int len) override
Send data to specified address and port.
Definition: UDPService.h:48
bool is_multicast
Definition: UDPService.h:79
bool send(uint8_t *data, int len) override
Send data to the default destination.
Definition: UDPService.h:46
IPAddressAndPort peer
Definition: UDPService.h:78
bool begin(int port) override
Initialize UDP service on specified port.
Definition: UDPService.h:33
UDPType udp
Definition: UDPService.h:77
bool begin(IPAddressAndPort addr) override
Initialize UDP service on specified address and port.
Definition: UDPService.h:39
Definition: Allocator.h:13
IP Adress including Port information.
Definition: IPAddressAndPort.h:20
const char * toString()
Definition: IPAddressAndPort.h:26
int port
Definition: IPAddressAndPort.h:24
IPAddress address
Definition: IPAddressAndPort.h:23
Provides information of the received UDP which consists of the (xml) data and the peer address and po...
Definition: IUDPService.h:22
IPAddressAndPort peer
Definition: IUDPService.h:24
Str data
Definition: IUDPService.h:23