82 Commits

Author SHA1 Message Date
Nick Mathewson
709c21c48c Bufferevent support for openssl.
This code adds a new Bufferevent type that is only compiled when the
openssl library is present.  It supports using an SSL object and an
event alert mechanism, which can either be an fd or an underlying
bufferevent.

There is still more work to do: the unit tests are incomplete, and we
need to support flush and shutdown much better.  Sometimes events are
generated needlessly: this will hose performance.

There's a new encrypting proxy in sample/le-proxy.c.

This code has only been tested on OSX, and nowhere else.

svn:r1382
2009-07-28 04:03:57 +00:00
Nick Mathewson
0cc10e419c Use -version-info, not -release.
Patch from Zack Weinberg.  His description:

This one might be a little more controversial. Libtool's -release and
-version-info options are supposed to be mutually exclusive, but it doesn't
either enforce that or make it sufficiently clear in the manual. Using
both makes the -version-info switch ineffective; you will get sonames like
"libevent-2.0.so.1", "libevent-2.1.so.1", etc., even though version 2.1
will presumably be backward ABI compatible with 2.0.

This patch just takes out the -release switches and bumps the -version-info
value to 2:0:0 so that people looking at the files in /usr/lib will not be
confused (it'll be "libevent.so.2"). This does change the soname, but the
current release is labeled an alpha, and it would be better to stop using
both switches as soon as possible, before someone over at libtool
headquarters decides to enforce the mutual exclusivity here...

Note that libevent_pthreads is not being linked with any versioning
switches I didn't change that because I wasn't sure whether it was
intentional.

svn:r1339
2009-07-13 20:02:49 +00:00
Nick Mathewson
85b0a7a23f We were distributing the wrong event-config.h with our source distributions. Fix that.
svn:r1289
2009-05-15 01:38:23 +00:00
Nick Mathewson
fe47003d06 Make unit tests for bufferevent_async compile and _almost_ work.
Either I need to make the callbacks get deferred in a base with no events (doable), or I need to make it okay to call launch_read from inside the callback for read (tricky).

svn:r1277
2009-05-05 16:52:37 +00:00
Nick Mathewson
659d54d530 Add new code to make and accept connections.
This is stuff that it's easy to get wrong (as I noticed when writing
bench_http), and that takes up a fair amount of space (see http.c).
Also, it's something that we'll eventually want to abstract to use
IOCP, where available.

svn:r1272
2009-05-05 02:59:26 +00:00
Niels Provos
0c15d6ab7d defer-internal.h was missing from dist; so our first tar ball did not even compile. ouch.
svn:r1207
2009-04-19 13:33:52 +00:00
Nick Mathewson
d047b323bd Increment version to 2.0.1-alpha, and add a numeric version facility
svn:r1193
2009-04-17 17:22:32 +00:00
Nick Mathewson
9097c95b6e Rename whatsnew file to reflect actual version.
svn:r1184
2009-04-17 06:56:23 +00:00
Nick Mathewson
838d0a81c3 Document many internal functions and pieces of code.
svn:r1181
2009-04-17 06:55:08 +00:00
Niels Provos
edfc28caef pkgconfig support from Ted Bullock
svn:r1177
2009-04-17 00:24:58 +00:00
Nick Mathewson
93d4f884aa Make buffer iocp stuff compile happily
svn:r1174
2009-04-14 20:11:10 +00:00
Nick Mathewson
23085c9247 Add a linked-pair abstraction to bufferevents.
The new bufferevent_pair abstraction works like a set of buferevent_sockets
connected by a socketpair, except that it doesn't require a socketpair,
and therefore doesn't need to get the kernel involved.

It's also a good way to make sure that deferred callbacks work.  It's a good
use case for deferred callbacks: before I implemented them, the recursive
relationship between the evbuffer callback and the read callback would
make the unit tests overflow the stack.

svn:r1152
2009-04-10 15:01:31 +00:00
Niels Provos
23655dfb87 include Doxyfile in tar ball; from Jeff Garzik
svn:r1125
2009-03-12 17:43:43 +00:00
Nick Mathewson
ea4b8724c0 checkpoint work on big bufferevent refactoring
svn:r1095
2009-02-02 19:22:13 +00:00
Nick Mathewson
39c8dbe073 Make ht-internal.h get distributed.
svn:r1072
2009-01-29 20:07:59 +00:00
Niels Provos
a077fb8c09 rename sys/signal.h to signal.h; configure m4 macro dir; this assist with compilation on Haiku
svn:r1033
2009-01-22 02:47:35 +00:00
Nick Mathewson
309fc7c4ad New functions to provide sane threading callbacks with pthreads and win32 threading implementations.
svn:r1031
2009-01-21 07:51:25 +00:00
Nick Mathewson
169321c9e6 Rename four internal headers to follow the -internal.h convention.
svn:r1000
2009-01-13 20:26:37 +00:00
Nick Mathewson
fbd5e820d7 Stop linking backends into libevent_extra.la
svn:r997
2009-01-13 19:20:22 +00:00
Nick Mathewson
554909420d Move internal headers into noinst_HEADERS automake target where they belong.
svn:r996
2009-01-13 19:20:14 +00:00
Nick Mathewson
5ebd23ad74 New EVUTIL_ERR_*_RETRIABLE macros to tell if an errno blocked or failed.
svn:r994
2009-01-13 19:19:50 +00:00
Nick Mathewson
1df57d2b97 Move strlcpy.c into libevent-core, so that code built against libevent-core on platforms without strlcpy can link.
svn:r991
2009-01-12 20:36:24 +00:00
Nick Mathewson
980bcd68f7 Work better with platforms that do not have ipv6 structures, or that do not have sin_len fields, etc.
svn:r986
2009-01-02 21:21:58 +00:00
Niels Provos
02b2b4d1be Restructure the event backends so that they do not need to keep track of events themselves, as a side effect multiple events can use the same fd or signal.
svn:r972
2008-12-23 16:37:01 +00:00
Nick Mathewson
a26442c5ac r19649@catbus: nickm | 2008-05-08 10:00:14 -0400
Replace gettimeofday() usage with a new evutil_gettimeofday().  This removes all previous need for win32-code/misc.[ch]


svn:r792
2008-05-08 14:06:33 +00:00
Niels Provos
36d7ab5082 trust in naming: rename evbuffer.c to bufferevent.c
svn:r767
2008-05-04 18:31:21 +00:00
Niels Provos
682adc443b support input/output filters for bufferevents
svn:r748
2008-04-30 00:09:16 +00:00
Niels Provos
558de9b377 Provide OpenSSL style support for multiple threads accessing the same event_base
svn:r684
2008-03-02 21:18:33 +00:00
Niels Provos
5c70ea4c9d improved code for evbuffer; avoids memcpy
svn:r674
2008-02-28 02:47:43 +00:00
Nick Mathewson
0d26f1605f r18169@catbus: nickm | 2008-02-18 15:13:20 -0500
Rebuild and re-run configure etc when configure.in or Makefile.am changes.  Also, have automake do its dependency tracking.


svn:r651
2008-02-18 20:13:27 +00:00
Nick Mathewson
127888bded r17291@catbus: nickm | 2007-12-20 17:19:55 -0500
Add tree.h to distributed files in trunk.


svn:r607
2007-12-20 22:20:06 +00:00
Nick Mathewson
9cc67e5f78 Compile regression tests by default even on win32.
svn:r578
2007-12-06 19:35:55 +00:00
Nick Mathewson
7eb250e9c5 r14939@tombo: nickm | 2007-11-25 11:59:26 -0500
New function event_set_mem_functions to replace internal calls to malloc, free, etc with a user-supplied functions.


svn:r541
2007-11-25 17:14:19 +00:00
Niels Provos
d1e03054a3 clean up event-config.h to fix make distcheck; from sourceforge tracker
svn:r521
2007-11-12 07:34:29 +00:00
Niels Provos
7add3d3641 stick autogen.sh into EXTRA_DIST
svn:r515
2007-11-12 02:44:02 +00:00
Niels Provos
df667b96ea we no longer need acconfig.h
svn:r510
2007-11-12 02:32:35 +00:00
Nick Mathewson
f74e7258fd r16501@catbus: nickm | 2007-11-07 01:00:31 -0500
This is one of those patches which will either make matters far
 simpler after the bugs shake out, or will get reverted pretty quick
 once we realize that it is a stupid idea.
 
 We now post-process the config.h file into a new event-config.h file,
 whose macros are prefixed with _EVENT_ and which is thus safe for
 headers to include.  Using this, we can define replacement timeval
 manipulation functions in evutil.h, and use them uniformly through our
 code.  We can also detect which headers are needful in event.h, and
 include them as required.
 
 This is also the perfect time to remove the long-deprecated acconfig.h
 file, so that autoheader no longer warns.
 
 Should resolve the following issues:
 
 [ 1826530 ] Header files should have access to autoconf output.
 [ 1826545 ] acconfig.h is deprecated.
 [ 1826564 ] On some platforms, event.h can't be included alone.
 


svn:r492
2007-11-07 06:01:57 +00:00
Nick Mathewson
e9564eceb3 r16487@catbus: nickm | 2007-11-06 22:38:44 -0500
Remove rtsig method, as discussed in July.  It hasn't compiled for quite a while, and nobody has seemed to miss it much.  Please let us know if this was a bad call. [Tracker issue 1826539].


svn:r485
2007-11-07 03:40:26 +00:00
Niels Provos
4555f75509 remove tree.h from EXTRA_DIST; from Charles Kerr
svn:r484
2007-11-07 03:25:03 +00:00
Nick Mathewson
1bcb112b20 r14698@tombo: nickm | 2007-11-03 22:20:23 -0400
Use libtool versioning correctly. Add comment to Makefile.am explaining how to keep this working.


svn:r472
2007-11-04 02:21:31 +00:00
Niels Provos
881731028b split libevent into two extra libraries libevent_core and libevent_extra
svn:r469
2007-11-03 23:45:38 +00:00
Niels Provos
30ae40cc52 switch timeouts to a min heap; from Maxim Yegorushkin
svn:r467
2007-11-03 18:04:53 +00:00
Nick Mathewson
250071830a r15216@catbus: nickm | 2007-09-20 13:58:23 -0400
Add a new evutil module to contain the usual cross-platform hacks: socketpair, closesocket, and make_socket_nonblocking()


svn:r441
2007-09-20 18:26:40 +00:00
Nick Mathewson
7f57289f99 r15103@catbus: nickm | 2007-09-18 11:13:09 -0400
Use a dummy target to ensure that doxygen gets rebuilt every time we "make doxygen".


svn:r439
2007-09-18 15:16:23 +00:00
Nick Mathewson
7135ffb6fc r15096@catbus: nickm | 2007-09-18 11:02:12 -0400
Add Doxygen documentation to header files; patch from Mark Heily.


svn:r436
2007-09-18 15:12:09 +00:00
Nick Mathewson
a36d4a930d r14699@catbus: nickm | 2007-08-20 10:42:57 -0400
Use $top_srcdir and $srcdir variables to refer to source paths in Makefile.am.  This makes it possible to build libevent from a separate directory.  Patch from Kelly Anderson.


svn:r400
2007-08-20 14:44:15 +00:00
Niels Provos
74f7118d66 install evrpc.h header
svn:r342
2007-03-03 08:16:40 +00:00
Niels Provos
b5d2f9a255 rolling back r339: evconfig.h does not work
svn:r341
2007-03-01 06:25:18 +00:00
Niels Provos
127c260bb7 make evconfig.h available as installed header file; not
really ideal but good enough for me; from Nick Mathewson


svn:r339
2007-02-28 04:02:29 +00:00
Niels Provos
7398790296 missing reference to strlcpy-internal
svn:r330
2007-02-15 22:46:04 +00:00