[Libwebsockets] Writeable callbacks on Windows only firing when timeout reached

Mark Hessling mark at rexx.org
Thu Mar 5 08:52:28 CET 2015

I've noticed that writeable callbacks (CALLBACK_SERVER_WRITEABLE, and 
CALLBACK_HTTP_WRITEABLE) on Windows fire irregularly, but mainly at the 
same rate as the timeout period in libwebsockets_service().

On Linux, these callbacks fire instantly.

I've attached a simple server program that demonstrates the behavioural 
difference between Windows and Linux.

The program is as simple as I could make it.  I also noticed that for 
some reason the server running on Windows seems to fire the 
CALLBACK_HTTP twice. I haven't determined why at the moment; the actual 
code I'm using doesn't do the same.

I've also only used libwebsockets calls that are documented mainly 
because I haven't spent heaps of time working out what the undocumented 
function calls do.

Cheers, Mark

* Mark Hessling, mark at rexx.org http://www.rexx.org/
* Author of THE, a Free XEDIT/KEDIT editor and, Rexx/SQL, Rexx/CURL, etc.
* Maintainer of Regina Rexx interpreter
* Use Rexx? join the Rexx Language Association: http://www.rexxla.org/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lws-bug.c
Type: text/x-csrc
Size: 3420 bytes
Desc: not available
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20150305/9cb8c16d/attachment.c>

More information about the Libwebsockets mailing list