mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-02-16 22:19:14 +01:00
21 lines
419 B
C
21 lines
419 B
C
|
typedef enum _MDNSServiceProtocol_t
|
||
|
{
|
||
|
MDNSServiceTCP,
|
||
|
MDNSServiceUDP
|
||
|
} MDNSServiceProtocol_t;
|
||
|
|
||
|
class MDNS {
|
||
|
public:
|
||
|
MDNS(EthernetUDP& udp);
|
||
|
~MDNS();
|
||
|
int begin(const IPAddress& ip, char* name);
|
||
|
int addServiceRecord(const char* name, uint16_t port, MDNSServiceProtocol_t proto);
|
||
|
void run();
|
||
|
private:
|
||
|
EthernetUDP *_udp;
|
||
|
IPAddress _ipAddress;
|
||
|
char* _name;
|
||
|
char* _serviceName;
|
||
|
int _servicePort;
|
||
|
};
|