mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Berry tcpclient uses Tasmota resolver (#17386)
This commit is contained in:
parent
b1fca09ad2
commit
0a57545e11
@ -194,7 +194,11 @@ extern "C" {
|
|||||||
timeout = be_toint(vm, 4);
|
timeout = be_toint(vm, 4);
|
||||||
}
|
}
|
||||||
// open connection
|
// open connection
|
||||||
bool success = tcp->connect(address, port, timeout);
|
IPAddress ipaddr;
|
||||||
|
bool success = WifiHostByName(address, ipaddr);
|
||||||
|
if (success) {
|
||||||
|
success = tcp->connect(ipaddr, port, timeout);
|
||||||
|
}
|
||||||
be_pushbool(vm, success);
|
be_pushbool(vm, success);
|
||||||
be_return(vm); /* return self */
|
be_return(vm); /* return self */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user