I've implemented a small piece of code that allows integrating libstrophe with libevent. It adds a new function
xmpp_conn_t *xmpp_conn_ev_new(xmpp_ctx_t * const ctx, struct event_base *base) that creates a connection that uses libevent loop instead off libstrophe loop.
The code is still missing at least two crucial parts:
Error handling
Allow compilation switch to disable/enable libevent support.
It might also be wise to somehow generalize it to allow other adapters except for a libevent adapter but i'm not 100% sure about how to do it yet.
Here is a commit with my changes, it is not complete yet so I'm not doing a pull request.
I've implemented a small piece of code that allows integrating libstrophe with libevent. It adds a new function
xmpp_conn_t *xmpp_conn_ev_new(xmpp_ctx_t * const ctx, struct event_base *base)
that creates a connection that uses libevent loop instead off libstrophe loop.The code is still missing at least two crucial parts:
It might also be wise to somehow generalize it to allow other adapters except for a libevent adapter but i'm not 100% sure about how to do it yet.
Here is a commit with my changes, it is not complete yet so I'm not doing a pull request.
https://github.com/tohava/libstrophe/commit/6e626123537e6f0585c4884895946fef590cb7a9
Is what I have so far ok? Also, is this fork of interest for you, will you consider merging it?