Arduino DLNA Server
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
tiny_dlna::UDPService< UDPType > Class Template Reference

Access to UDP functionality: sending and receiving of data. More...

#include <UDPService.h>

Inheritance diagram for tiny_dlna::UDPService< UDPType >:
Inheritance graph
[legend]
Collaboration diagram for tiny_dlna::UDPService< UDPType >:
Collaboration graph
[legend]

Public Member Functions

 UDPService ()=default
 
bool begin (int port) override
 
bool begin (IPAddressAndPort addr) override
 
bool send (uint8_t *data, int len) override
 
bool send (IPAddressAndPort addr, uint8_t *data, int len) override
 
RequestData receive () override
 
virtual bool begin (int port)=0
 
virtual bool begin (IPAddressAndPort addr)=0
 
virtual bool send (uint8_t *data, int len)=0
 
virtual bool send (IPAddressAndPort addr, uint8_t *data, int len)=0
 
virtual RequestData receive ()=0
 

Protected Attributes

UDPType udp
 
IPAddressAndPort peer
 
bool is_multicast = false
 

Detailed Description

template<typename UDPType>
class tiny_dlna::UDPService< UDPType >

Access to UDP functionality: sending and receiving of data.

This class is a template and requires you to specify the UDP implementation type. For example, use UDPService<WiFiUDP> for WiFiUDP or UDPService<MyUDPType> for a custom UDP class.

Usage: UDPService<WiFiUDP> udp; // Uses WiFiUDP UDPService<MyUDPType> udp2; // Uses custom UDP type

Implements IUDPService for sending and receiving UDP packets, including multicast support.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ UDPService()

template<typename UDPType >
tiny_dlna::UDPService< UDPType >::UDPService ( )
default

Member Function Documentation

◆ begin() [1/2]

template<typename UDPType >
bool tiny_dlna::UDPService< UDPType >::begin ( int  port)
inlineoverridevirtual

◆ begin() [2/2]

template<typename UDPType >
bool tiny_dlna::UDPService< UDPType >::begin ( IPAddressAndPort  addr)
inlineoverridevirtual

◆ receive()

template<typename UDPType >
RequestData tiny_dlna::UDPService< UDPType >::receive ( )
inlineoverridevirtual

◆ send() [1/2]

template<typename UDPType >
bool tiny_dlna::UDPService< UDPType >::send ( IPAddressAndPort  addr,
uint8_t *  data,
int  len 
)
inlineoverridevirtual

◆ send() [2/2]

template<typename UDPType >
bool tiny_dlna::UDPService< UDPType >::send ( uint8_t *  data,
int  len 
)
inlineoverridevirtual

Member Data Documentation

◆ is_multicast

template<typename UDPType >
bool tiny_dlna::UDPService< UDPType >::is_multicast = false
protected

◆ peer

template<typename UDPType >
IPAddressAndPort tiny_dlna::UDPService< UDPType >::peer
protected

◆ udp

template<typename UDPType >
UDPType tiny_dlna::UDPService< UDPType >::udp
protected

The documentation for this class was generated from the following file: