mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
ESP8266mDNS using the provided IP in the begin method (#2349)
this fix forces the mDNS to use the provided IP in the begin method instead of the auto detected IP. this is required if the ESP8266 starts in the AP_STA mode and activates only the AP initially.
This commit is contained in:
committed by
Ivan Grokhotkov
parent
c4c207a85e
commit
b682d597c5
@ -63,9 +63,7 @@ public:
|
||||
~MDNSResponder();
|
||||
bool begin(const char* hostName);
|
||||
//for compatibility
|
||||
bool begin(const char* hostName, IPAddress ip, uint32_t ttl=120){
|
||||
return begin(hostName);
|
||||
}
|
||||
bool begin(const char* hostName, IPAddress ip, uint32_t ttl=120);
|
||||
void update();
|
||||
|
||||
void addService(char *service, char *proto, uint16_t port);
|
||||
@ -116,8 +114,9 @@ private:
|
||||
bool _waitingForAnswers;
|
||||
WiFiEventHandler _disconnectedHandler;
|
||||
WiFiEventHandler _gotIPHandler;
|
||||
|
||||
uint32_t _ip;
|
||||
|
||||
bool _begin(const char* hostName, uint32_t ip, uint32_t ttl);
|
||||
uint32_t _getOurIp();
|
||||
uint16_t _getServicePort(char *service, char *proto);
|
||||
MDNSTxt * _getServiceTxt(char *name, char *proto);
|
||||
|
Reference in New Issue
Block a user