[Libwebsockets] Some help wanted explaining how the dumb-increment-protocol works
colinpauladams at gmail.com
Sun May 8 21:38:47 CEST 2016
I'm writing a wrapper around libwebsocket v2 for the Idris programming
language. I started by writing an Idris version of the test-server-v2.0,
but using the distributed plugins (i.e. as compiled from C).
Once I got that working nicely (early this morning, UK time), I tried to
implement the dumb-increment-protocol in Idris (but not a plugin, since I
don't think I can currently use Idris to create shared objects), so I'm
looking at test-server-dumb-increment.c as an implementation template.
I've got this roughly 1/4 working. Only one LWS_CALLBACK_SERVER_WRITEABLE
gets seen by my handler, and debugging shows it writes one byte (a "1")
successfully, But the number doesn't get displayed in the web page. The
request Server Close button DOES work (debugging shows my handler receives
the message, but it never receives a reset\n message when I press the reset
So I'm a little puzzled as to what's going on. In particular, I don't
understand where the 20Hz refresh rate is supposed to come from. If you
could explain that, it will probably be enough for me to work out what I
have done wrong.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets