forked from espressif/arduino-esp32
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user