1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

comments in ClientContext::connect() (#7961)

* add comment
This commit is contained in:
david gauchard 2021-04-05 15:09:27 +02:00 committed by GitHub
parent bde6ab1df2
commit 0049090e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,6 +131,9 @@ public:
int connect(ip_addr_t* addr, uint16_t port) int connect(ip_addr_t* addr, uint16_t port)
{ {
// note: not using `const ip_addr_t* addr` because
// - `ip6_addr_assign_zone()` below modifies `*addr`
// - caller's parameter `WiFiClient::connect` is a local copy
#if LWIP_IPV6 #if LWIP_IPV6
// Set zone so that link local addresses use the default interface // Set zone so that link local addresses use the default interface
if (IP_IS_V6(addr) && ip6_addr_lacks_zone(ip_2_ip6(addr), IP6_UNKNOWN)) { if (IP_IS_V6(addr) && ip6_addr_lacks_zone(ip_2_ip6(addr), IP6_UNKNOWN)) {