Arduino DLNA Server
Loading...
Searching...
No Matches
IUDPService.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <WiFi.h>
5#include <WiFiUdp.h>
6
8#include "basic/Str.h"
9#include "assert.h"
10
11namespace tiny_dlna {
12
13// multicast address for SSDP
14static IPAddressAndPort DLNABroadcastAddress{IPAddress(239, 255, 255, 250),
15 1900};
16
26 operator bool() { return !data.isEmpty(); }
27};
28
35 public:
36 virtual bool begin(int port) = 0;
37 virtual bool begin(IPAddressAndPort addr) = 0;
38 virtual bool send(uint8_t *data, int len) = 0;
39 virtual bool send(IPAddressAndPort addr, uint8_t *data, int len) = 0;
40 virtual RequestData receive() = 0;
41};
42
43} // namespace tiny_dlna
Abstract Interface for UDP API.
Definition: IUDPService.h:34
virtual RequestData receive()=0
virtual bool send(IPAddressAndPort addr, uint8_t *data, int len)=0
virtual bool begin(IPAddressAndPort addr)=0
virtual bool begin(int port)=0
virtual bool send(uint8_t *data, int len)=0
virtual bool isEmpty()
checks if the string is empty
Definition: StrView.h:383
String implementation which keeps the data on the heap. We grow the allocated memory only if the copy...
Definition: Str.h:22
Definition: Allocator.h:6
IP Adress including Port information.
Definition: IPAddressAndPort.h:20
Provides information of the received UDP which consists of the (xml) data and the peer address and po...
Definition: IUDPService.h:23
IPAddressAndPort peer
Definition: IUDPService.h:25
Str data
Definition: IUDPService.h:24