[Libwebsockets] Bug? LWS-native poll() amidst custom polls

Andy Green andy at warmcat.com
Thu Jun 24 14:38:57 CEST 2021

On 6/24/21 11:50 AM, Felipe Gasper wrote:
>> On Jun 24, 2021, at 1:08 AM, andy at warmcat.com wrote:
>> Yes, he services ripe timeouts too.  Once you confirmed the example works just follow it (as far as possible, the actual custom loop you want to work with might not be so nice).
> Yeah in this case the custom loop is a library like libev, where you don’t actually poll() manually. So I had to “translate” from that example.

Right... one advantage of reusing the event lib ops for this is that all 
the existing support for things like libev uses the same ops.  So if you 
have to, eg, make the scheduled event timer for libev, specifically that 
already exists in event lib ops form for reference


...it also means there are definitely enough hooks in the ops struct to 
do anything any other event lib needed.

>> If you don't care you can turn off netlink monitoring at cmake.  But it allows lws to 1) track interfaces, source addresses and gateways to perform dns result sorting, and 2) allows lws to respond to existing connections becoming unroutable immediately by closing them.  Eventually this info will be used for additional desirable features.
> Thanks for the background!
> I think this gets me to “minimum viable”. I’ll see about cleaning this up and hopefully publish it soon.

Sounds good!


More information about the Libwebsockets mailing list