Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f5c6f3b

Browse files
committed
WiFiUDP: properly resolve URLs
1 parent 727d4bd commit f5c6f3b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎libraries/WiFi/src/WiFiUdp.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ int arduino::WiFiUDP::beginPacket(IPAddress ip, uint16_t port) {
6868

6969
int arduino::WiFiUDP::beginPacket(const char *host, uint16_t port) {
7070
_host = SocketAddress(host, port);
71+
WiFi.getNetwork()->gethostbyname(host, &_host);
7172
//If IP is null and port is 0 the initialization failed
7273
return (_host.get_ip_address() == nullptr && _host.get_port() == 0) ? 0 : 1;
7374
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /