@@ -76,23 +76,23 @@ class MDNSResponder {
7676 void addService (const char *service, const char *proto, uint16_t port){
7777 addService ((char *)service, (char *)proto, port);
7878 }
79- void addService (String service, String proto, uint16_t port){
79+ void addService (const String& service, const String& proto, uint16_t port){
8080 addService (service.c_str (), proto.c_str (), port);
8181 }
8282
8383 bool addServiceTxt (char *name, char *proto, char * key, char * value);
8484 bool addServiceTxt (const char *name, const char *proto, const char *key,const char * value){
8585 return addServiceTxt ((char *)name, (char *)proto, (char *)key, (char *)value);
8686 }
87- bool addServiceTxt (String name, String proto, String key, String value){
87+ bool addServiceTxt (const String& name, const String& proto, const String& key, const String& value){
8888 return addServiceTxt (name.c_str (), proto.c_str (), key.c_str (), value.c_str ());
8989 }
9090
9191 int queryService (char *service, char *proto);
9292 int queryService (const char *service, const char *proto){
9393 return queryService ((char *)service, (char *)proto);
9494 }
95- int queryService (String service, String proto){
95+ int queryService (const String& service, const String& proto){
9696 return queryService (service.c_str (), proto.c_str ());
9797 }
9898 String hostname (int idx);
0 commit comments