[Libwebsockets] Winsock ioctlsocket set to blocking mode ?

Andy Green andy at warmcat.com
Thu Sep 25 08:54:54 CEST 2014

On 25 September 2014 01:14:38 GMT+08:00, bjorka adinov <adinov.bjorka at gmail.com> wrote:
>Hello Sir,
>Sorry if my question is downright amateurish as I'm little bit confused
>right now.
>I'm using winsock on Windows 7, with libwebsocket ver. 1.23
>As far as I know, libwebsocket utilize socket in non-blocking mode, but
>found the statement
>ioctlsocket(fd, FIONBIO, &optl);
>where optl value equals zero, which is basically setting the socket to
>blocking mode. So a little help will be much appreciated.

I'm sorry I have no idea about the Windows platform stuff.

It's all contributed and I only test the Linux stuff.

What you're saying is right, everything should be nonblocking in lws (and is in the Linux platfom stuff).  If it isn't, it'll still seem to work OK normally but under some conditions, all connections will block waiting for one bad guy.


>Thank you
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org

More information about the Libwebsockets mailing list