File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ int DNSClient::inet_aton(const char* address, IPAddress& result)
85
85
return 1 ;
86
86
}
87
87
88
- int DNSClient::getHostByName (const char * aHostname, IPAddress& aResult)
88
+ int DNSClient::getHostByName (const char * aHostname, IPAddress& aResult, uint16_t timeout )
89
89
{
90
90
int ret = 0 ;
91
91
@@ -118,7 +118,7 @@ int DNSClient::getHostByName(const char* aHostname, IPAddress& aResult)
118
118
int wait_retries = 0 ;
119
119
ret = TIMED_OUT;
120
120
while ((wait_retries < 3 ) && (ret == TIMED_OUT)) {
121
- ret = ProcessResponse (5000 , aResult);
121
+ ret = ProcessResponse (timeout , aResult);
122
122
wait_retries++;
123
123
}
124
124
}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class DNSClient
26
26
@result 1 if aIPAddrString was successfully converted to an IP address,
27
27
else error code
28
28
*/
29
- int getHostByName (const char * aHostname, IPAddress& aResult);
29
+ int getHostByName (const char * aHostname, IPAddress& aResult, uint16_t timeout= 5000 );
30
30
31
31
protected:
32
32
uint16_t BuildRequest (const char * aName);
You can’t perform that action at this time.
0 commit comments