Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http3+ngtcp2: ngtcp2.c doesn't build on Windows #4531

jblazquez opened this issue Oct 27, 2019 · 2 comments

http3+ngtcp2: ngtcp2.c doesn't build on Windows #4531

jblazquez opened this issue Oct 27, 2019 · 2 comments


Copy link

@jblazquez jblazquez commented Oct 27, 2019

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.

Copy link

@bagder bagder commented Oct 27, 2019

libcurl should probably set the socket to non-blocking even if passed in by the application

(I don't think anyone has tried this on windows before you...)

Copy link
Contributor Author

@jblazquez jblazquez commented Oct 27, 2019

Sounds good, getting a PR ready then,

@bagder bagder closed this in e0ee3d9 Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.