[Libwebsockets] libwebsockets integration in zeroMQ zloop or libev, anyone?
mail17 at mah.priv.at
Sat May 11 14:05:04 CEST 2013
I'm investigating integration of libwebsockets into a zeroMQ (actually czmq) event loop, as well as libev (different use case)
the issue I have is:
- libwebsockets assumes there is a poll(2) call in the external event loop and relies on the pollfds data structure
- this is not a given with czmq (or libev for that matter) which might use one of a series of different event notification mechanism: poll,epoll, select, kqueue etc
- czmq deals with the issue by abstracting the actual system call arguments by providing its own event notification data structure, zmq_pollitem_t (see http://api.zeromq.org/3-2:zmq-poll)
- libev does this in a very similar way with struct ev_watcher
I'm unsure how to do this without butchering up the library code proper, which I'd prefer to avoid
I'd be happy with a stopgap measure for now
wouldnt it be better long term to remove the assumption of a particular underlying system call altogether?
More information about the Libwebsockets