关于从源代码编译libevent,我只是注意到它似乎依赖于OpenSSL 加密 o_O。
这听起来很臃肿。
的libevent-2.0.21稳定/ README
38 The configure script also supports the following flags:
39
40 --enable-gcc-warnings Enable extra compiler checking with GCC.
41 --disable-malloc-replacement
42 Don't let applications replace our memory
43 management functions
44 --disable-openssl Disable support for OpenSSL encryption.
45 --disable-thread-support Don't support multithreaded environments.
答案 0 :(得分:2)
来自whatsnew-2.0.txt
:
5.4. SSL support for bufferevents with OpenSSL
There is now a bufferevent type that supports SSL/TLS using the
OpenSSL library. The code for this is build in a separate
library, libevent_openssl, so that your programs don't need to
link against OpenSSL unless they actually want SSL support.
There are two ways to construct one of these bufferevents, both
declared in <event2/bufferevent_ssl.h>. If you want to wrap an
SSL layer around an existing bufferevent, you would call the
bufferevent_openssl_filter_new() function. If you want to do SSL
on a socket directly, call bufferevent_openssl_socket_new().
如果您需要SSL套接字,这是为了您的方便。如果您不需要它,为什么不使用您问题的README代码段中的选项来禁用它?