Update MDNSResponder::addService to return a boolean (#4365)

I was playing with the mDNS service and noticed the method MDNSResponder::addService could return a Boolean with the way it is implemented just like other functions in this library.

This would be handy to know at a higher level weather or not the service was added correctly to the mDNS server of the ESP32.
This commit is contained in:
thebigpotatoe
2020-10-01 22:44:24 +10:00
committed by GitHub
parent 82670b96f8
commit 99aa866477
2 changed files with 8 additions and 6 deletions

View File

@ -65,12 +65,12 @@ public:
setInstanceName(String(name));
}
void addService(char *service, char *proto, uint16_t port);
void addService(const char *service, const char *proto, uint16_t port){
addService((char *)service, (char *)proto, port);
bool addService(char *service, char *proto, uint16_t port);
bool addService(const char *service, const char *proto, uint16_t port){
return addService((char *)service, (char *)proto, port);
}
void addService(String service, String proto, uint16_t port){
addService(service.c_str(), proto.c_str(), port);
bool addService(String service, String proto, uint16_t port){
return addService(service.c_str(), proto.c_str(), port);
}
bool addServiceTxt(char *name, char *proto, char * key, char * value);