Skip to content

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

@jblazquez

Description

@jblazquez

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HTTP/3h3 or quic relatedWindowsWindows-specific

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions