Mark Ellzey
1ed6718d1d
expose bufferevent_incref/decref (with fewer modifications)
2015-05-06 14:56:31 -07:00
Nick Mathewson
1cae3ae167
Merge remote-tracking branch 'public/master'
2015-02-02 13:57:50 -05:00
Nick Mathewson
537177d315
New function to get address for nameserver.
2015-02-02 13:57:22 -05:00
jer-gentoo
8674e4fb0a
EVBUFFER_PTR_SET -> EVBUFFER_PTR_ADD
...
Looks like EVBUFFER_PTR_ADD should have been used instead of EVBUFFER_PTR_SET.
2015-01-21 11:24:23 +01:00
Andrea Shepard
f2645f80c1
Implement new/free for struct evutil_monotonic_timer and export monotonic time functions
2014-12-04 09:30:20 -05:00
Nick Mathewson
7fd4941465
Merge remote-tracking branch 'origin/pr/182'
2014-11-30 19:26:20 -05:00
Nick Mathewson
23133cacc8
Merge remote-tracking branch 'origin/pr/180'
2014-11-30 19:25:21 -05:00
John Ohl
2b9ec4c13c
Implement interface that provides the ability to have an outbound evhttp_connection free itself once all requests have completed
2014-10-26 01:25:28 -04:00
Jean-Philippe Ouellet
b361b8a656
remove trailing comma from enum
...
makes being included from something with -std=c89 happy
2014-10-16 22:56:49 -04:00
Maciej Soltysiak
b625361a6a
Provide support for SO_REUSEPORT through LEV_OPT_REUSABLE_PORT
2014-10-13 17:28:14 +02:00
Nick Mathewson
0fb71c35dc
Merge remote-tracking branch 'origin/patches-2.0'
2014-10-09 10:14:30 -04:00
Nick Mathewson
be1aeff21a
Fix a typo in a doxygen comment. Reported by 亦得.
2014-10-09 10:14:12 -04:00
Nick Mathewson
c243dbf4c8
Merge pull request #168 from ufo2243/master
...
make bufferevent_getwatermark api more robust
2014-09-18 11:44:11 -04:00
Nick Mathewson
73615a3723
Merge pull request #118 from azat/http-forward-family-to-bufferevent
...
Add evhttp_connection_set_family() to set addrinfo->family for DNS requests
2014-09-18 11:31:52 -04:00
ufo2243
a21e5108c2
make bufferevent_getwatermark api more robust
2014-09-12 11:51:59 +08:00
Azat Khuzhin
12c29b0f6e
Add evhttp_connection_set_family() to set addrinfo->family for DNS requests
...
This is useful if you want to avoid extra dns requests.
2014-03-21 17:32:09 +04:00
Nick Mathewson
58408eedd8
Fix duplicate paragraph in evbuffer_ptr documentation
2014-03-12 14:06:02 -04:00
Trond Norbye
4545fa9b68
Add option to build shared library
2014-02-25 14:57:24 +01:00
Nick Mathewson
53d279389a
Expand EV_CLOSED documentation a bit
2014-01-21 15:44:05 -05:00
Diego Giagio
b1b69ac7c1
Implemented EV_CLOSED event for epoll backend (EPOLLRDHUP).
...
- Added new EV_CLOSED event - detects premature connection close
by clients without the necessity of reading all the pending
data. Does not depend on EV_READ and/or EV_WRITE.
- Added new EV_FEATURE_EARLY_CLOSED feature for epoll.
Must be supported for listening to EV_CLOSED event.
- Added new regression test: test-closed.c
- All regression tests passed (test/regress and test/test.sh)
- strace output of test-closed using EV_CLOSED:
socketpair(PF_LOCAL, SOCK_STREAM, 0, [6, 7]) = 0
sendto(6, "test string\0", 12, 0, NULL, 0) = 12
shutdown(6, SHUT_WR) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLRDHUP, {u32=7, u64=7}}) = 0
epoll_wait(3, {{EPOLLRDHUP, {u32=7, u64=7}}}, 32, 3000) = 1
epoll_ctl(3, EPOLL_CTL_MOD, 7, {EPOLLRDHUP, {u32=7, u64=7}}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...})
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYM...
write(1, "closed_cb: detected connection close "..., 45) = 45
2014-01-17 23:20:42 -02:00
Nick Mathewson
8d15f57f61
Merge remote-tracking branch 'asweeny86/on-complete-cb'
2014-01-07 16:59:26 -05:00
Andrew Sweeney
da86dda951
evhttp_request_set_on_complete_cb to be more specific about what the function actually does and usage
2014-01-06 20:36:31 -05:00
Nick Mathewson
f9e091bf4e
Merge remote-tracking branch 'asweeny86/event-count-max'
2014-01-06 12:11:30 -05:00
Andrew Sweeney
b083ca0551
Provide on request complete callback facility
...
This patch provides the ability to receive a callback on the completion of a
request. The callback takes place immediately before the request's resources
are released.
2014-01-05 20:35:46 -05:00
Andrew Sweeney
5173bef50f
Add access to max event count stats
...
This commit provides an interface for accessing and resetting the maximum
number of events in a given period. This information provides better insight
into event queue pressure.
2013-12-30 14:06:20 -05:00
Nick Mathewson
471fbe3baf
Merge remote-tracking branch 'rbalint/from-forked-daapd'
2013-12-24 12:27:24 -05:00
Nick Mathewson
a3172a415b
Minor optimizations on bufferevent_trigger options
...
By making BEV_TRIG_DEFER_CALLBACKS equal to BEV_OPT_DEFER_CALLBACKS,
and BEV_TRIG_IGNORE_WATERMARKS disjoint from BEV_OPT_*, we can save a
few operations in bufferevent_run_*, which is critical-path.
2013-12-24 11:30:06 -05:00
Nick Mathewson
b4ef3def6f
Merge remote-tracking branch 'mistotebe/bufferevent_trigger'
2013-12-24 10:33:58 -05:00
Nick Mathewson
87fa2b004a
Unit tests for active_by_fd; unsupport active_by_fd(TIMEOUT)
...
[It turns out that event_base_active_by_fd(TIMEOUT) didn't actually
work right. Feel free to add it back in as a patch.]
2013-12-23 20:46:38 -05:00
Nick Mathewson
486594337a
Add event_base_active_by_signal by analogy
2013-12-21 23:32:10 -05:00
Nick Mathewson
5c9da9a8a8
Sanity-check arguments to event_base_active_by_fd()
2013-12-21 23:21:33 -05:00
Nick Mathewson
93369ff4e9
Merge remote-tracking branch 'ghazel/event_base_active_by_fd'
2013-12-21 23:15:41 -05:00
Nick Mathewson
db7acd1310
Merge remote-tracking branch 'origin/patches-2.0'
2013-12-20 13:37:39 -05:00
Nick Mathewson
eaa79cd459
Merge remote-tracking branch 'sourceforge/patches-2.0' into patches-2.0
...
Conflicts:
include/event2/event.h
2013-12-20 13:37:04 -05:00
Nick Mathewson
8cd695bf6d
Typo fixes from Linus Nordberg
2013-12-20 13:35:03 -05:00
Nick Mathewson
cec62cb80a
Typo fixes from Linus Nordberg
2013-12-20 13:31:29 -05:00
Nick Mathewson
031a803071
Clarify event_base_loop exit conditions
2013-12-16 12:02:21 -05:00
Nick Mathewson
45eba6ffd5
Rename flush_outdated_host_addresses to clear_host_addresses
...
"flush" can imply writing something out to a file or connection before
clearing it; "clear" always means "remove". It's also potentially
misleading to say "outdated" here, since the function removes _all_
addresses regardless, not just certain outdated ones.
Also, don't free the lock in this function. Also reindent the function.
2013-12-06 10:50:17 -05:00
Kuldeep Gupta
f03d3535af
bug fix for issues #293 evdns_base_load_hosts doesn't remove outdated addresses
...
As mentioned at https://sourceforge.net/p/levent/bugs/293/
created a small function "evdns_base_flush_outdated_host_addresses" which removes all the previous host addresses, if user wants to clean up the list of hosts can call and use this function.
Defination of this function is part of another patch.
2013-12-06 17:06:20 +05:30
Ondřej Kuzník
a7384c7824
Add an option to trigger bufferevent event callbacks
2013-12-03 23:39:13 +00:00
Ondřej Kuzník
61ee18b8b1
Add an option to trigger bufferevent I/O callbacks
2013-12-03 23:39:13 +00:00
Ondřej Kuzník
4ce242bd00
Add watermark introspection
2013-12-03 23:39:13 +00:00
Ondřej Kuzník
13a9a020e1
Document deferred eventcb behaviour
2013-12-03 23:39:13 +00:00
Ondřej Kuzník
be7bf2c768
Fix a typo
2013-12-03 23:39:13 +00:00
Nick Mathewson
ccf432b912
Try another doxygen tweak
2013-11-21 11:47:34 -05:00
Nick Mathewson
6e67b51023
Small doxygen tweaks
2013-11-21 11:30:04 -05:00
Balint Reczey
b0bd7fe1db
Allow registering callback for parsing HTTP headers
...
Slightly changed version of Espen Jürgensen's
commit 548141e72312126fa6121f6a5f436đ251c7fb1251 for forked-daapd.
2013-11-18 18:24:15 +01:00
Julien BLACHE
8d8decf114
Add a variant of evhttp_send_reply_chunk() with a callback on evhttp_write_buffer()
...
evhttp_write_buffer() used by evhttp_send_reply_chunk() can take callback
executed when (part of) the buffer has been written. Using this callback to
schedule the next chunk avoids buffering large amounts of data in memory.
2013-11-18 15:39:47 +01:00
Azat Khuzhin
0c7f0405e3
http: implement new evhttp_connection_get_addr() api.
...
Basically tcp final handshake looks like this:
(C - client, S - server)
ACK[C] - FIN/ACK[S] - FIN/ACK[S] - ACK [C]
However there are servers, that didn't close connection like this,
while it is still _considered_ as valid, and using libevent http layer
we can do requests to such servers.
Modified handshake:
(C - client, S - server)
ACK[C] - RST/ACK[S] - RST/ACK[S]
And in this case we can't extract IP address from socket, because it is
already closed, and getpeername() will return: "transport endpoint is not connected".
So we need to store address that we are connecting to, after we know it,
and that is what this patch do.
I have reproduced it, however it have some extra packages.
(I will try to fix it)
https://github.com/azat/nfq-examples/blob/master/nfqnl_rst_fin.c
2013-10-14 11:22:29 -04:00
Nicolas Martyanoff
5a5acd9a70
add a http default content type option
2013-09-30 18:11:26 +02:00