HalosGhost/shaman

async/event interface

Opened this issue · 1 comments

http://curl.haxx.se/libcurl/c/libcurl-multi.html

In particular I'm interested in

Enable the application to wait for action on its own file descriptors and curl's file descriptors simultaneous easily.

Roughly, you should be writing your HTTP request to the socket, then passing the socket back to me (the libshaman caller). I then use that in my own epoll loop, then give you back your descriptor to do the real read, and give me the data I asked for.

Ultimately, it would allow things like prc to handle other irc-protocol things without waiting for OWM to do the hokey-pokey.

Let me know if you want this, and I'll get started on a PR.

I don't mean to dissuade you because PRs are always welcome, but this personal project is actually mostly done because I enjoy doing it. If this is something I eventually decide to implement, I would love the chance to try to implement it myself (since I've never worked with curl's multi interface before, this would be a great learning experience).