[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] OpenSSL-based bufferevents
I'm trying to figure out the best practice when it comes to OpenSSL
based bufferevents. For reference, I'm looking at the source code as
well as http://www.wangafu.net/~nickm/libevent-book/Ref6a_advanced_bufferevents.html
As background, I have a fairly stable transport layer implemented
using regular bufferevents. I'm now planning to add SSL support to the
transport. The other end in my case is implemented in Java, if that
matters.
Questions:
* Should I be using socket-based or filter-based bufferevent? A
comment in the code seems to indicate that the former might be faster
on all platforms except Windows. What kind of performance difference
are we talking about here? In terms of abstractions, I like the latter
because I can then think in terms of a chain of filtered bufferevents.
* How stable is the OpenSSL support in bufferevents? I just hacked up
a quick prototype where I create a filter bufferevent on top of my
existing bufferevent and I'm seeing all kinds of strange behavior.
Specifically, I'm seeing deadlock-like hangs (will file a proper bug
report with stack traces later). Note that I'm using libevent with
thread support, bufferevents with OPT_THREADSAFE, DEFERRED_CALLBACKS
and UNLOCK_CALLBACKS.
* When using a filtered bufferevent, should the filter be created
AFTER the original bufferevent has successfully established
connection? This works for me but if I create the filter immediately
and then call bufferevent_socket_connect_hostname, I never get the
event callback.
Thanks,
Diwaker
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.