Skip to content

Commit

Permalink
Make version notes more accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
nmathewson committed Feb 5, 2010
1 parent a6bca62 commit 1fa7026
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 27 deletions.
6 changes: 1 addition & 5 deletions Ref2_eventbase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ By default, all new events associated with this base will be initialized
with priority equal to n_priorities / 2.

The event_base_priority_init function is defined in <event2/event.h>. It has
been available since before Libevent 1.0.
been available since Libevent 1.0.


Reinitializing an event_base after fork()
Expand Down Expand Up @@ -367,7 +367,6 @@ This function worked like event_base_new(), and set the current base
to the allocated base. There was no other way to change the
current base.


Some of the event_base functions in this section had variants that
operated on the current base. These functions behaved as the current
functions, except that they took no base argument.
Expand All @@ -379,6 +378,3 @@ functions, except that they took no base argument.
| event_base_get_method() | event_get_method()
|======================================================================

// FIXME Undocumented:
// event_base_make_notifiable()

2 changes: 1 addition & 1 deletion Ref3_eventloop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ flags set. Thus, it keeps running until there are no more registered events
or until event_base_loopbreak() or event_base_loopexit() is called.

These functions are defined in <event2/event.h>. They have existed since
before Libevent 1.0.
Libevent 1.0.

Stopping the loop
~~~~~~~~~~~~~~~~~
Expand Down
5 changes: 3 additions & 2 deletions Ref4_event.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ improving the clarity of your code.
event_pending((ev), (what), (tv_out))
--------

These macros have been present since before Libevent 1.0.
These macros have been present since Libevent 0.6, except for evtimer_new(),
which first appeared in Libevent 2.0.1-alpha.

Constructing signal events
^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -498,7 +499,7 @@ When you do not set the priority for an event, the default is the
number of queues in the event base, divided by 2.

This function is declared in <event2/event.h>. It has existed since
before Libevent 1.0.
Libevent 1.0.

Inspecting event status
~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
25 changes: 13 additions & 12 deletions Ref6_bufferevent.txt
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ If the BEV_OPT_CLOSE_ON_FREE flag was set, and this bufferevent has a
socket or underlying bufferevent associated with it as its transport,
that transport is closed when you free the bufferevent.

This function was introduced before Libevent 1.0.
This function was introduced in Libevent 0.8.

Manipulating callbacks, watermarks, and enabled operations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -402,7 +402,7 @@ reading.
You can call bufferevent_get_enabled() to see which events are currently
enabled on the bufferevent.

These functions were introduced before Libevent 1.0, except for
These functions were introduced in Libevent 0.8, except for
bufferevent_get_enabled(), which was introduced in version 2.0.3-alpha.

.Interface
Expand Down Expand Up @@ -542,7 +542,7 @@ end of the output buffer. Calling bufferevent_write_buffer() removes
the entire contents of 'buf' and puts them at the end of the output
buffer. Both return 0 if successful, or -1 if an error occurred.

These functions have existed since before Libevent 1.0.
These functions have existed since Libevent 0.8.

.Interface
[code,C]
Expand All @@ -562,7 +562,7 @@ drains the entire contents of the input buffer and places them into
Note that with bufferevent_read(), the memory chunk at 'data' must
actually have enough space to hold 'size' bytes of data.

The bufferevent_read() function has existed since before Libevent 1.0;
The bufferevent_read() function has existed since Libevent 0.8;
bufferevent_read_buffer() was introduced in Libevent 2.0.1-alpha.

.Example
Expand Down Expand Up @@ -675,7 +675,7 @@ As of Libevent 2.0.2-alpha, only socket-based bufferevents support
timeouts. More bufferevent types should support timeouts in the
future.

This functions has existed since Libevent 2.0.1-alpha
This functions has existed since Libevent 2.0.1-alpha.

Initiating a flush on a bufferevent
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -710,7 +710,7 @@ priorities.
This function returns 0 on success, and -1 on failure. It works on
socket-based bufferevents only.

This function was introduced before Libevent 1.0.
This function was introduced in Libevent 1.0.

.Interface
[code,C]
Expand All @@ -723,7 +723,7 @@ These functions set or return the file descriptor for a fd-based
event. Only socket-based bufferevents support setfd(). Both return
-1 on failure; setfd() returns 0 on success.

The bufferevent_setfd() function was introduced before Libevent 1.4.4;
The bufferevent_setfd() function was introduced in Libevent 1.4.4;
the bufferevent_getfd() function was introduced in Libevent 2.0.2-alpha.

.Interface
Expand Down Expand Up @@ -770,9 +770,10 @@ Libevent 2.0:
The old functions were defined in event.h, not in event2/bufferevent.h.

If you still need access to the internals of the common parts of the
bufferevent struct, include event2/bufferevent_struct.h. The macros
and names in this section are available if you include
event2/bufferevent_compat.h.
bufferevent struct, you can include event2/bufferevent_struct.h. We
recommend against it: the contents of struct bufferevent WILL change between
versions of Libevent. The macros and names in this section are available if
you include event2/bufferevent_compat.h.

The interface to set up a bufferevent differed in older versions:

Expand All @@ -795,5 +796,5 @@ void bufferevent_settimeout(struct bufferevent *bufev,
--------

Finally, note that the underlying evbuffer implementation for Libevent
versions before 2.0 makes using bufferevents for high-performance apps
kind of questionable.
versions before 2.0 was pretty inefficient, to the point where using
bufferevents for high-performance apps was kind of questionable.
13 changes: 7 additions & 6 deletions Ref7_evbuffer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ These functions should be relatively clear: evbuffer_new() allocates
and returns a new empty evbuffer, and evbuffer_free() deletes one and
all of its contents.

These functions have existed since before Libevent 1.0.
These functions have existed since Libevent 0.8.

Evbuffers and Thread-safety
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -135,9 +135,9 @@ evbuffer_add(buf, "Hello world 2.0.1", 17);
evbuffer_add_printf(buf, "Hello %s %d.%d.%d", "world", 2, 0, 1);
--------

The evbuffer_add(), evbuffer_add_printf(), and evbuffer_expand() functions
were introduced before Libevent 1.0; and evbuffer_add_printf() first
appeared in Libevent 1.1.
The evbuffer_add() and evbuffer_add_printf() functions were introduced in
Libevent 0.8; evbuffer_expand() was in Libevent 0.9, and
evbuffer_add_printf() first appeared in Libevent 1.1.

Moving data from one evbuffer to another
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -161,7 +161,7 @@ from 'src' to the end of 'dst', copying as little as possible. If
there are fewer than 'datlen' bytes to move, it moves all the bytes.
It returns the number of bytes moved.

We introduced evbuffer_add_buffer() before Libevent 1.0;
We introduced evbuffer_add_buffer() in Libevent 0.8;
evbuffer_remove_buffer() was new in Libevent 2.0.1-alpha.

Adding data to the front of an evbuffer
Expand Down Expand Up @@ -271,7 +271,8 @@ The evbuffer_drain() function behaves as evbuffer_remove(), except
that it does not copy the data: it just removes it from the front of
the buffer. It returns 0 on success and -1 on failure.

These functions have existed since before Libevent 1.0.
Libevent 0.8 introduced evbuffer_drain(); evbuffer_remove() appeared in
Libevent 0.9.

Line-oriented input
~~~~~~~~~~~~~~~~~~~
Expand Down
5 changes: 4 additions & 1 deletion Ref8_listener.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ The evconnlistener mechanism gives you a way to listen for and accept
incoming TCP connections.

All the functions and types in this section are declared in
event2/listener.h. They first appeared in Libevent 2.0.2-alpha.
event2/listener.h. They first appeared in Libevent 2.0.2-alpha, unless
otherwise noted.

Creating or freeing an evconnlistener
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -124,6 +125,8 @@ struct event_base *evconnlistener_get_base(struct evconnlistener *lev);
These functions return a listener's associated socket and event_base
respectively.

The evconnlistener_get_fd() function first appeared in Libevent 2.0.3-alpha.

Example code: an echo server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 1fa7026

Please sign in to comment.