quic: use send/recvmmsg when available

add checks for sendmmsg in configure and CmakeLists.txt for enabling use
of these functions in ngtcp2/quiche quic.

Closes #14880
This commit is contained in:
Stefan Eissing 2024-09-12 12:24:42 +02:00 committed by Daniel Stenberg
parent 876f17ad24
commit 97c0f89bd0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 24 additions and 12 deletions

View file

@ -169,6 +169,7 @@ static int get_address_family(curl_socket_t sockfd)
{
struct sockaddr addr;
curl_socklen_t addrlen = sizeof(addr);
memset(&addr, 0, sizeof(addr));
if(getsockname(sockfd, (struct sockaddr *)&addr, &addrlen) == 0)
return addr.sa_family;
return AF_UNSPEC;