[Libevent-users] SSL enabling libevent programs, is there an example available?

William Ahern william at 25thandClement.com
Mon Jan 21 20:02:19 EST 2008


On Tue, Jan 22, 2008 at 01:09:11AM +0100, Ron Arts wrote:
> Hi,
> 
> subject says it all. If there's no example with
> libevent, can someone recommend another place to look?
> I tried Googling but couldn't find a concise example.
> 

http://25thandclement.com/~william/projects/libevnet.html

Download the tarball. OpenSSL bindings are in src/tls.c. There's lots more
code in the library for integrating with libevent, but I wrote tls.c many
years ago (before libevnet, and possibly before libevent), and it should be
easy to rip it out and use however you want.

At the very least, tls_read_try(), tls_write_try() and tls_accept_try()
should help you out.



More information about the Libevent-users mailing list