|
98e9119f
|
2012-03-25T18:56:15
|
|
Fix a typo in the bufferevent documentation
|
|
e49e2891
|
2012-02-10T17:29:53
|
|
Update copyright notices to 2012
|
|
3c824bd3
|
2011-10-24T13:18:09
|
|
Update copyright dates to 2011.
|
|
2888facc
|
2011-07-04T23:02:11
|
|
Revise the event/evbuffer/bufferevent doxygen for clarity and accuracy
|
|
c8baac90
|
2011-03-07T21:55:47
|
|
Followup for Tomash Brechko's http patch
This patch makes bufferevent_disable_hard() non-public, and
adds a comment about what it's for and why it's used.
|
|
5dc56628
|
2011-02-24T12:30:40
|
|
Workaround libevent bug
https://sourceforge.net/tracker/index.php?func=detail&aid=3078187&group_id=50884&atid=461324
The problem is that bufferevent_disable() doesn't disable EV_WRITE
when 'connecting' flag is set. However from evhttp_connection_reset()
we want to disable EV_WRITE for sure (we are closing the socket next).
So we add bufferevent_disable_hard(), which acts like
bufferevent_disable(), but resets 'connecting' flag before the call to
the actual handler.
TODO: bufferevent_disable_hard() shouldn't be public, remove it from
event2/bufferevent.h.
|
|
2cbb1a16
|
2010-10-26T10:27:29
|
|
Make rate-limits go up to SIZE_MAX/EV_SSIZE_MAX, not just INT32_MAX
Someday, when networks are far faster and people frequently want a
burst value greater than 2GB per tick, this will seem very forsightful
indeed.
For now, it breaks ABI, but not source. Fixes bug 3092096.
|
|
70e1b607
|
2010-10-21T14:05:04
|
|
Document that two bufferevent functions only work on socket bufferevents
|
|
aab49b60
|
2010-10-21T14:04:24
|
|
Add a bufferevent_get_base function
|
|
ec347b92
|
2010-07-07T16:45:03
|
|
Move event-config.h to include/event2
This change means that all required include files are in event2, and
all files not in event2/* are optional.
|
|
6ae53d67
|
2010-08-04T15:44:08
|
|
Add an interface to expose min_share in ratelimiting groups
|
|
215e629c
|
2010-06-21T12:26:21
|
|
Add bufferevent_lock()/bufferevent_unlock()
Although bufferevent operations are threadsafe, sometimes you need
to make sure that a few operations on a single bufferevent will all
be executed with nothing intervening. That's what these functions
are for.
|
|
17a8e2d7
|
2010-06-07T12:06:43
|
|
Add a function to retrieve the other side of a bufferevent pair
|
|
a62c8433
|
2010-05-06T14:16:50
|
|
Merge commit 'chrisd/connect-hostname-report-err'
|
|
a5208fe4
|
2010-04-27T13:42:26
|
|
Release locks on bufferevents while executing callbacks
This fixes a dead lock for me where bufferevents in different event
loops use each other and access their input/output buffers (proxy-like
scenario).
|
|
0ef40706
|
2010-04-24T00:06:38
|
|
Report DNS error when lookup fails during bufferevent_socket_connect_hostname.
|
|
fb366c1d
|
2010-03-21T13:16:31
|
|
Functions to track the total bytes sent over a rate limit group.
|
|
ee41aca6
|
2010-03-12T00:46:39
|
|
Functions to manipulate existing rate limiting groups.
This patch adds a function to change the current rate limit of a rate
limiting group, and another to free an empty rate limiting group.
|
|
17efc1cd
|
2010-03-04T01:25:51
|
|
Update all our copyright notices to say "2010"
|
|
d3288293
|
2010-02-20T18:44:35
|
|
Provide consistent, tested semantics for bufferevent timeouts
The different bufferevent implementations had different behavior for
their timeouts. Some of them kept re-triggering the timeouts
indefinitely; some disabled the event immediately the first time a
timeout triggered. Some of them made the timeouts only count when
the bufferevent was actively trying to read or write; some did not.
The new behavior is modeled after old socket bufferevents, since
they were here first and their behavior is relatively sane.
Basically, each timeout disables the bufferevent's corresponding
read or write operation when it fires. Timeouts are stopped
whenever we suspend writing or reading, and reset whenever we
unsuspend writing or reading. Calling bufferevent_enable resets a
timeout, as does changing the timeout value.
|
|
162ce8a8
|
2010-02-23T00:38:30
|
|
Expose view of current rate limit as constrained by group limit
|
|
e5bbd40a
|
2010-02-18T17:41:15
|
|
Clean up formatting: use tabs, not 8-spaces, to indent.
|
|
85047a69
|
2010-02-03T15:12:04
|
|
Functions to view and manipulate rate-limiting buckets.
We need these for Tor, and other projects probably need them too. Uses
include:
- Checking whether bandwidth is mostly-used, and only taking some
actions when there's plenty of bandwidth.
- Deducting some non-bufferevent activities from a rate-limit group.
|
|
da6135e3
|
2010-02-03T02:09:19
|
|
Reduce windows header includes in our own headers.
It turns out that absolutely everything that was including
windows.h was doing so needlessly; our headers don't need it,
so we should just include winsock2.h (since that's where
struct timeval is defined).
Pre-2.0 code will use the old headers, which include windows.h
for them, so we aren't breaking source compatibility with 1.4.
This solves the bug where we were leaving WIN32_LEAN_AND_MEAN
defined, in roughly the same way that buying an automobile
solves the question of what to give your coachman for boxing
day.
|
|
361da8f2
|
2010-01-25T13:54:14
|
|
Note a missing ratelim function
|
|
ff3f6cd4
|
2010-01-22T16:14:49
|
|
Check more internal event_add() calls for failure
Most of these should be unable to fail, since adding a timeout
generally always works. Still, it's better not to try to be "too
smart for our own good here."
There are some remaining event_add() calls that I didn't add checks
for; I've marked those with "XXXX" comments.
|
|
737c9cd8
|
2009-11-27T13:16:54
|
|
Rate-limiting for bufferevents; group and individual limits are supported.
The fairness algorithms are not the best, not every bufferevent type
is supported, and some of the locking tricks here are simply absurd.
Still, this code should be a good first step.
|
|
0b9eb1bf
|
2009-11-03T20:40:48
|
|
Add a bufferevent function to resolve a name then connect to it.
This function, bufferevent_socket_connect_hostname() can either use
evdns to do the resolve, or use a new function (evutil_resolve) that
uses getaddrinfo or gethostbyname, like http.c does now.
This function is meant to eventually replace the hostname resolution mess in
http.c.
svn:r1496
|
|
e90e14fb
|
2009-11-02T16:31:13
|
|
Call the bufferevent_flush_mode variable "mode" more consistently in the documentation. Spotted by Alex.
svn:r1485
|
|
b73ad7bc
|
2009-10-21T18:48:22
|
|
Treat the bitwise OR of two enum values as an int.
This makes our interfaces usable from C++, which doesn't believe
you can say "bufferevent_socket_nase(base, -1,
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS)" but which instead
would demand "static_cast<bufferevent_options>(BEV_OPT_CLOSE_ON_FREE|
BEV_OPT_DEFER_CALLBACKS))" for the last argument.
Diagnosis and patch from Chris Davis.
svn:r1456
|
|
800f9aa6
|
2009-08-09T20:17:29
|
|
When bufferevent_socket_connect is called with no address, assume that our existing fd is connecting and put the connection into "connecting" mode.
svn:r1411
|
|
7c688dd9
|
2009-07-31T14:41:45
|
|
New function to expose bufferevent.enabled
svn:r1401
|
|
eb97bb76
|
2009-05-28T15:58:28
|
|
Make the headers compile happily with pedantic C compilers.
Original message from SF patch 2797966:
While commas at the end of enumerator lists are valid in c99, they
are not valid +in c89 nor in c++. When using gcc/g++ with the
-pedantic flag, users will +receive a warning (gcc) or an
error(g++) when including the event2/event.h and
+event2/bufferevent.h. The errors look something like
event2/event.h:159: error: comma at end of enumerator list
Patch from Akita Noek on Sourceforge.
svn:r1321
|
|
0b4ab122
|
2009-05-28T15:47:15
|
|
Spell-check the the headers
svn:r1320
|
|
5232cfa3
|
2009-05-25T23:11:20
|
|
Consistently say "eventcb" instead of "errorcb"
svn:r1316
|
|
31d89f27
|
2009-05-13T20:37:21
|
|
Add a "ctrl" mechanism to bufferevents for property access.
OpenSSL uses something like this to implement get/set access for
properties on its BIOs, so that it doesn't need to add a pair of
get/set functions to the vtable struct for every new abstract property
it provides an accessor for.
Doing this lets us make bufferevent_setfd abstract, and implement an
abstract bufferevent_getfd.
svn:r1284
|
|
83f46e51
|
2009-05-13T20:36:56
|
|
Do not use the "evbuffer_" prefix to denote parts of bufferevents.
This is a bit of an interface doozy, but it's really needed in order
to be able to document this stuff without apologizing it. This patch
does the following renamings:
evbuffercb -> bufferevent_data_cb
everrorcb -> bufferevent_event_cb
EVBUFFER_(READ,WRITE,...) -> BEV_EVENT_(...)
EVBUFFER_(INPUT,OUTPUT) -> bufferevent_get_(input,output)
All the old names are available in event2/bufferevent_compat.h
svn:r1283
|
|
659d54d5
|
2009-05-05T02:59:26
|
|
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
|
|
b2e8fd0e
|
2009-04-30T23:56:53
|
|
Apparently MSVC lacks a ssize_t. Define an ev_ssize_t for headers, and make ssize_t work elsewhere.
svn:r1261
|
|
a98a512b
|
2009-04-17T23:12:34
|
|
Add a generic way for any bufferevent to make its callback deferred
svn:r1197
|
|
838d0a81
|
2009-04-17T06:55:08
|
|
Document many internal functions and pieces of code.
svn:r1181
|
|
915193e7
|
2009-04-13T03:17:19
|
|
Locking support for bufferevents.
svn:r1170
|
|
decdacfa
|
2009-04-10T20:42:53
|
|
Better explanation for bufferevent_pair
svn:r1153
|
|
23085c92
|
2009-04-10T15:01:31
|
|
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
|
|
ea4b8724
|
2009-02-02T19:22:13
|
|
checkpoint work on big bufferevent refactoring
svn:r1095
|
|
b85b710c
|
2009-01-27T22:34:36
|
|
Update copyright statements to reflect the facts that:
a) this is 2009
b) niels and nick have been comaintainers for a while
c) saying "all rights reserved" when you then go on to explicitly
disclaim some rights is sheer cargo-cultism.
svn:r1065
|
|
c735f2b4
|
2009-01-23T01:11:13
|
|
Code to allow multiple callbacks per evbuffer.
svn:r1042
|
|
8278c9be
|
2009-01-14T22:17:46
|
|
Note the one restriction on what you can do with the evbuffers of a bufferevent.
svn:r1011
|
|
6bf1ca78
|
2008-05-12T00:40:04
|
|
r19675@catbus: nickm | 2008-05-11 20:39:39 -0400
Stop pretending that u_char and u_short are standard types that win32 is dumb not to have. In fact, u_char can really just be spelled out, and u_short was usually just a bad way of saying ev_uint16_t.
svn:r808
|
|
8acb80b4
|
2008-05-08T22:51:39
|
|
r15551@tombo: nickm | 2008-05-08 14:49:20 -0400
Use _get_ convention for new accessor functions. (These are all new ones as of 2.0, I believe).
svn:r799
|
|
522480f5
|
2008-04-30T01:01:57
|
|
improve documentation for bufferevent.h
svn:r750
|
|
682adc44
|
2008-04-30T00:09:16
|
|
support input/output filters for bufferevents
svn:r748
|
|
9485ff9a
|
2008-04-27T20:40:56
|
|
introduce bufferevent_setcb and bufferevent_setfd to allow better manipulation of bufferevents
svn:r737
|
|
dd183f7c
|
2008-04-27T00:32:10
|
|
provide bufferevent_input and bufferevent_output without requiring knowledge of the structure
svn:r734
|
|
3278012f
|
2008-04-26T00:35:17
|
|
expose bufferevent_setwatermark via header files and fix high watermark on read
svn:r729
|
|
89f63b20
|
2008-04-25T02:44:46
|
|
add bufferevent_read_buffer function
svn:r728
|
|
963ae2cf
|
2008-04-16T21:01:31
|
|
r15212@tombo: nickm | 2008-04-16 17:01:21 -0400
Remove some needless includes
svn:r712
|
|
0ac73078
|
2008-04-16T20:01:51
|
|
r15193@tombo: nickm | 2008-04-16 16:00:35 -0400
Split event.h into several new headers in include/event2. event.h is now just a wrapper that includes all the subheaders.
svn:r711
|