-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
Description
I did this
I tried to build libcurl on Windows with HTTP/3 enabled against ngtcp2, but it failed with the following error:
lib\vquic\ngtcp2.c(1407,63): error C2065: 'MSG_DONTWAIT': undeclared identifier
MSG_DONTWAIT
does not exist on Windows.
On Windows, one must set the socket to nonblocking mode in order for sendto
and recvfrom
to return WSAEWOULDBLOCK
:
u_long nonblocking = 1;
ioctlsocket(sockfd, FIONBIO, &nonblocking);
How should libcurl handle this? The socket is not always created by libcurl itself. It could be created by the hosting application if it installed a CURLOPT_OPENSOCKETFUNCTION
, and there's currently no way to request a nonblocking socket via that callback.
Should libcurl always set the UDP socket to nonblocking when creating it on behalf of ngtcp2?
I expected the following
I expected the build to succeed.
curl/libcurl version
curl commit: 0f234a5
operating system
Windows 10.