[Libwebsockets] i686-w64-mingw32 and Windows 7 (64bit): WSAPoll fails

Arokux B. arokux at gmail.com
Mon Mar 4 18:22:31 CET 2013


Hello,

it would be nice to add some error handling after a call to the poll.
On Windows 7 (64bit), libwebsockets library compiled with
i686-w64-mingw32 toolchain does not work. The example
libwebsockets-test-server.exe returns immediately, due to -1 return
value from libwebsocket_service and in turn from poll. I've digged a
bit into it. The _WIN32 is defined, and the module Ws2_32.dll exists,
getting an address to WSAPoll also succseeded. So as poll, WSAPoll is
used.

However a call to poll (that is WSAPoll) returns -1, and printing
WSAGetLastError gives 10022, which means WSAEINVAL (Invalid argument).
After falling to the emulated poll, the example works, so I can use
this as a workaround.

Unfortunately I have very limited knowledge of Windows platform, so if
you want me to test it further, you'd need to give me precise
directions.

Thanks
Arokux



More information about the Libwebsockets mailing list