93 Commits

Author SHA1 Message Date
Nick Mathewson
4d92e4261b forward-port: Make evdns_resolve_reverse args const.
svn:r1096
2009-02-02 19:22:27 +00:00
Nick Mathewson
ea4b8724c0 checkpoint work on big bufferevent refactoring
svn:r1095
2009-02-02 19:22:13 +00:00
Nick Mathewson
8d3a10f8f1 Support temporarily suspending an evbuffer callback. This is different from disabling the callback, since we want to process changes, but not just yet.
svn:r1091
2009-02-01 01:43:58 +00:00
Nick Mathewson
2e50658d8d Fix a typo in buffer.h
svn:r1089
2009-02-01 01:07:33 +00:00
Niels Provos
66b2a7ffb7 test evbuffer_add_reference
svn:r1068
2009-01-29 03:20:40 +00:00
Nick Mathewson
b85b710cf5 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
2009-01-27 22:34:36 +00:00
Nick Mathewson
9993137cbb Remove all trailing whitespace in all the source files.
svn:r1063
2009-01-27 21:10:31 +00:00
Niels Provos
fdf694933c sendfile/mmap and memory reference implementation for evbuffers
svn:r1057
2009-01-27 06:05:38 +00:00
Niels Provos
b93e505452 second argument to evbuffer_pullup should be ssize_t
svn:r1056
2009-01-27 05:33:39 +00:00
Nick Mathewson
c0712b1608 Initial documentation for evdns server functions. Also deprecate the one that didn't take an event_base.
svn:r1054
2009-01-26 17:29:45 +00:00
Nick Mathewson
bdbd5e0e2f For every deprecated function, explain why it is deprecated and what you should call instead.
svn:r1052
2009-01-26 17:09:37 +00:00
Nick Mathewson
52a75f18e1 Documentation (or more accurate documentation) for a few more functions.
svn:r1051
2009-01-26 17:09:22 +00:00
Nick Mathewson
dddd58ba13 Reformat util.h slightly so that it looks ok with 8-char tabs.
svn:r1050
2009-01-26 17:09:09 +00:00
Niels Provos
765ff1b9de really install the buffer_compat.h file
svn:r1048
2009-01-24 17:38:27 +00:00
Nick Mathewson
81dd04a726 Add a "flags" field to evbuffer callbacks.
For now, there is just one: enabled.  This lets us avoid lots of
mallocs/frees/tailq-manipulations just to turn a callback on and off.
The revised bufferevent code wants this.

svn:r1047
2009-01-23 18:04:34 +00:00
Nick Mathewson
de7f7a84a3 Remove in_callbacks check: allow full recursion in evbuffer callbacks. If you get yourself in an infinite loop, that's not our fault. Note this in the docs. Also reindent some docs now that my tabs match Niels's.
svn:r1046
2009-01-23 18:03:45 +00:00
Niels Provos
b1495865aa also install the buffer_compat.h header file
svn:r1044
2009-01-23 02:04:41 +00:00
Nick Mathewson
ec2f4cbc09 Move obsolete evbuffer function into include/event2/buffer_compat.h
svn:r1043
2009-01-23 01:35:57 +00:00
Nick Mathewson
c735f2b45a Code to allow multiple callbacks per evbuffer.
svn:r1042
2009-01-23 01:11:13 +00:00
Nick Mathewson
f20902a290 Remove evperiodic_assign and its related parts: its functionality is subsumed by EV_PERSIST timeouts.
svn:r1040
2009-01-22 17:56:15 +00:00
Niels Provos
56ea4687a5 Change the semantics of timeouts in conjunction with EV_PERSIST; timeouts in that case will now repeat until deleted.
svn:r1032
2009-01-22 02:33:38 +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
ec4cfa33c9 Make event_break threadsafe; make notify-thread mechanism a little more generic; let it use pipes where they work.
svn:r1019
2009-01-19 01:34:14 +00:00
Nick Mathewson
8278c9be54 Note the one restriction on what you can do with the evbuffers of a bufferevent.
svn:r1011
2009-01-14 22:17:46 +00:00
Nick Mathewson
840318196b Make some evbuffer functions const
svn:r1010
2009-01-14 22:17:31 +00:00
Nick Mathewson
99db0e7f72 Add a new evbuffer_write_atmost() functino to write no more than a given number of bytes to an fd.
svn:r993
2009-01-12 20:42:19 +00:00
Nick Mathewson
f446f1493a Small cleanups to buffer.h documentation.
svn:r992
2009-01-12 20:42:06 +00:00
Nick Mathewson
cfbd168008 Add another function to parse the common address:port combination formats into a sockaddr.
svn:r984
2009-01-02 20:46:26 +00:00
Nick Mathewson
0d9d5cfe22 New functions in evutil to clone inet_pton and inet_ntop, with tests.
Adapted from Tor code.

svn:r983
2009-01-02 20:46:12 +00:00
Niels Provos
87be18daa1 implement evdns_cancel_request; test one of the new evdns_base functions
svn:r980
2008-12-25 16:25:37 +00:00
Niels Provos
d776f8462b deprecate the usage of signal_{add,del,set} and name it evsignal_{add,del,set} instead; move the old definitions to compat
svn:r973
2008-12-23 22:23:37 +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
dd73168556 Implement increased DSN-poisoning resistance via the 0x20 hack.
svn:r958
2008-12-03 20:09:13 +00:00
Niels Provos
cdf9453af4 install the header files, too
svn:r956
2008-11-28 20:55:11 +00:00
Niels Provos
1c765b78fb move dns header files into the include directory; move old functions into compat and structs into a struct header file
svn:r955
2008-11-28 20:11:24 +00:00
Niels Provos
5792d42f0f Allow setting of local port for evhttp connections to support millions of connections from a single system; from Richard Jones
svn:r948
2008-11-16 23:22:14 +00:00
Nick Mathewson
de069b9977 On win32, errno is not the last socket error. Worse, WSAGetLastError() is not the last socket error sometimes (i.e., EWOULDBLOCK). Also, strerror() does not handle winsock errors. Therefore, event_err() and event_warn() are completely wrong for windows socket errors. Fix that.
svn:r936
2008-09-05 16:29:56 +00:00
Niels Provos
f7e61870e9 support multiple events listening on the same signal; make signals regular events that go on the same event queue
svn:r901
2008-07-11 15:49:04 +00:00
Niels Provos
9998c0cbc8 correct handling of trailing headers in chunked replies; from Scott Lamb.
svn:r887
2008-06-26 00:40:57 +00:00
Niels Provos
21f76156b1 change min_heap_idx to signed
svn:r883
2008-06-25 16:32:47 +00:00
Niels Provos
99a1063e73 support 64-bit integers in rpc structs
svn:r856
2008-06-21 02:21:25 +00:00
Niels Provos
344c2b56f1 deliver partial data to request callbacks when chunked callback is set even if there is no chunking on the http level; allows cancelation of requests from within the chunked callback; from Scott Lamb.
svn:r846
2008-06-02 05:45:26 +00:00
Niels Provos
480d8142b8 do not define a variable in a header file; it will lead to duplicate symbols when linking
svn:r844
2008-06-01 01:19:08 +00:00
Niels Provos
f9707a01e5 we need to declare the enum first before it can be used; c++ compilation errors
svn:r843
2008-05-31 18:57:21 +00:00
Nick Mathewson
05965921ab Add new functions to access backends by their features and to query the features of a backend.
svn:r842
2008-05-31 14:37:31 +00:00
Nick Mathewson
39400e68b6 Patch from Valery Kholodkov: support for edge-triggered events with epoll and kqueue. Changed from original patch: made test into a regression test, with explicit success/failure for edge-triggered and non-edge-triggered cases. Closes SF request 1968284.
svn:r840
2008-05-30 16:56:34 +00:00
Niels Provos
8b66f1bd4d constify struct timeval *
svn:r836
2008-05-17 02:14:17 +00:00
Nick Mathewson
a68de2525d r19749@catbus: nickm | 2008-05-14 23:48:44 -0400
New function to dump inserted and active events.  Also do not recv() on an int array.


svn:r829
2008-05-15 03:49:03 +00:00
Niels Provos
ef0221cc39 document chunked replies plus fix doxygen warnings
svn:r815
2008-05-13 03:42:47 +00:00
Nick Mathewson
c6da86ffcb r19709@catbus: nickm | 2008-05-12 12:42:48 -0400
Possible fix for [1960723] snprintf and vsnprintf return values are wrong on win32


svn:r813
2008-05-12 16:44:24 +00:00