mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 04:25:32 +00:00
examples: Strip IPv6 function in example and use sockaddr_storage to replace sockaddr_in6
This commit is contained in:
@@ -60,7 +60,7 @@ static void tcp_client_task(void *pvParameters)
|
||||
addr_family = AF_INET6;
|
||||
ip_protocol = IPPROTO_IPV6;
|
||||
#elif defined(CONFIG_EXAMPLE_SOCKET_IP_INPUT_STDIN)
|
||||
struct sockaddr_in6 dest_addr = { 0 };
|
||||
struct sockaddr_storage dest_addr = { 0 };
|
||||
ESP_ERROR_CHECK(get_addr_from_stdin(PORT, SOCK_STREAM, &ip_protocol, &addr_family, &dest_addr));
|
||||
#endif
|
||||
int sock = socket(addr_family, SOCK_STREAM, ip_protocol);
|
||||
|
Reference in New Issue
Block a user