whatsnew-2.0.txt 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. What's New In Libevent 2.0 so far:
  2. 1. Meta-issues
  3. 1.1. About this document
  4. This document describes the key differences between Libevent 1.4 and
  5. Libevent 2.0, from a user's point of view. It was most recently
  6. updated based on features in git master as of August 2010.
  7. NOTE: I am very sure that I missed some thing on this list. Caveat
  8. haxxor.
  9. 1.2. Better documentation
  10. There is now a book-in-progress that explains how to use Libevent and its
  11. growing pile of APIs. As of this writing, it covers everything except the
  12. http and rpc code. Check out the latest draft at
  13. http://www.wangafu.net/~nickm/libevent-book/ .
  14. 2. New and Improved Event APIs
  15. Many APIs are improved, refactored, or deprecated in Libevent 2.0.
  16. COMPATIBILITY:
  17. Nearly all existing code that worked with Libevent 1.4 should still
  18. work correctly with Libevent 2.0. However, if you are writing new code,
  19. or if you want to port old code, we strongly recommend using the new APIs
  20. and avoiding deprecated APIs as much as possible.
  21. Binaries linked against Libevent 1.4 will need to be recompiled to link
  22. against Libevent 2.0. This is nothing new; we have never been good at
  23. preserving binary compatibility between releases. We'll try harder in the
  24. future, though: see 2.1 below.
  25. 2.1. New header layout for improved forward-compatibility
  26. Libevent 2.0 has a new header layout to make it easier for programmers to
  27. write good, well-supported libevent code. The new headers are divided
  28. into three types.
  29. There are *regular headers*, like event2/event.h. These headers contain
  30. the functions that most programmers will want to use.
  31. There are *backward compatibility headers*, like event2/event_compat.h.
  32. These headers contain declarations for deprecated functions from older
  33. versions of Libevent. Documentation in these headers should suggest what's
  34. wrong with the old functions, and what functions you want to start using
  35. instead of the old ones. Some of these functions might be removed in a
  36. future release. New programs should generally not include these headers.
  37. Finally, there are *structure headers*, like event2/event_struct.h.
  38. These headers contain definitions of some structures that Libevent has
  39. historically exposed. Exposing them caused problems in the past,
  40. since programs that were compiled to work with one version of Libevent
  41. would often stop working with another version that changed the size or
  42. layout of some object. We've moving them into separate headers so
  43. that programmers can know that their code is not depending on any
  44. unstable aspect of the Libvent ABI. New programs should generally not
  45. include these headers unless they really know what they are doing, are
  46. willing to rebuild their software whenever they want to link it
  47. against a new version of Libevent, and are willing to risk their code
  48. breaking if and when data structures change.
  49. Functionality that once was located in event.h is now more subdivided.
  50. The core event logic is now in event2/event.h. The "evbuffer" functions
  51. for low-level buffer manipulation are in event2/buffer.h. The
  52. "bufferevent" functions for higher-level buffered IO are in
  53. event2/bufferevent.h.
  54. COMPATIBILITY:
  55. All of the old headers (event.h, evdns.h, evhttp.h, evrpc.h, and
  56. evutil.h) will continue to work by including the corresponding new
  57. headers. Old code should not be broken by this change.
  58. 2.2. New thread-safe, binary-compatible, harder-to-mess-up APIs
  59. Some aspects of the historical Libevent API have encouraged
  60. non-threadsafe code, or forced code built against one version of Libevent
  61. to no longer build with another. The problems with now-deprecated APIs
  62. fell into two categories:
  63. 1) Dependence on the "current" event_base. In an application with
  64. multiple event_bases, Libevent previously had a notion of the
  65. "current" event_base. New events were linked to this base, and
  66. the caller needed to explicitly reattach them to another base.
  67. This was horribly error-prone.
  68. Functions like "event_set" that worked with the "current" event_base
  69. are now deprecated but still available (see 2.1). There are new
  70. functions like "event_assign" that take an explicit event_base
  71. argument when setting up a structure. Using these functions will help
  72. prevent errors in your applications, and to be more threadsafe.
  73. 2) Structure dependence. Applications needed to allocate 'struct
  74. event' themselves, since there was no function in Libevent to do it
  75. for them. But since the size and contents of struct event can
  76. change between libevent versions, this created binary-compatibility
  77. nightmares. All structures of this kind are now isolated in
  78. _struct.h header (see 2.1), and there are new allocate-and-
  79. initialize functions you can use instead of the old initialize-only
  80. functions. For example, instead of malloc and event_set, you
  81. can use event_new().
  82. (For people who do really want to allocate a struct event on the
  83. stack, or put one inside another structure, you can still use
  84. event2/event_compat.h.)
  85. So in the case where old code would look like this:
  86. #include <event.h>
  87. ...
  88. struct event *ev = malloc(sizeof(struct event));
  89. /* This call will cause a buffer overrun if you compile with one version
  90. of Libevent and link dynamically against another. */
  91. event_set(ev, fd, EV_READ, cb, NULL);
  92. /* If you forget this call, your code will break in hard-to-diagnose
  93. ways in the presence of multiple event bases. */
  94. event_set_base(ev, base);
  95. New code will look more like this:
  96. #include <event2/event.h>
  97. ...
  98. struct event *ev;
  99. ev = event_new(base, fd, EV_READ, cb, NULL);
  100. 2.3. Overrideable allocation functions
  101. If you want to override the allocation functions used by libevent
  102. (for example, to use a specialized allocator, or debug memory
  103. issues, or so on), you can replace them by calling
  104. event_set_mem_functions. It takes replacements for malloc(),
  105. free(), and realloc().
  106. If you're going to use this facility, you need to call it _before_
  107. Libevent does any memory allocation; otherwise, Libevent may allocate some
  108. memory with malloc(), and free it with the free() function you provide.
  109. You can disable this feature when you are building Libevent by passing
  110. the --disable-malloc-replacement argument to configure.
  111. 2.4. Configurable event_base creation
  112. Older versions of Libevent would always got the fastest backend
  113. available, unless you reconfigured their behavior with the environment
  114. variables EVENT_NOSELECT, EVENT_NOPOLL, and so forth. This was annoying
  115. to programmers who wanted to pick a backend explicitly without messing
  116. with the environment.
  117. Also, despite our best efforts, not every backend supports every
  118. operation we might like. Some features (like edge-triggered events, or
  119. working with non-socket file descriptors) only work with some operating
  120. systems' fast backends. Previously, programmers who cared about this
  121. needed to know which backends supported what. This tended to get quite
  122. ungainly.
  123. There is now an API to choose backends, either by name or by feature.
  124. Here is an example:
  125. struct event_config_t *config;
  126. struct event_base *base;
  127. /* Create a new configuration object. */
  128. config = event_config_new();
  129. /* We don't want to use the "select" method. */
  130. event_config_avoid_method(config, "select");
  131. /* We want a method that can work with non-socket file descriptors */
  132. event_config_require_features(config, EV_FEATURE_FDS);
  133. base = event_base_new_with_config(config);
  134. if (!base) {
  135. /* There is no backend method that does what we want. */
  136. exit(1);
  137. }
  138. event_config_free(config);
  139. Supported features are documented in event2/event.h
  140. 2.5. Socket is now an abstract type
  141. All APIs that formerly accepted int as a socket type now accept
  142. "evutil_socket_t". On Unix, this is just an alias for "int" as
  143. before. On Windows, however, it's an alias for SOCKET, which can
  144. be wider than int on 64-bit platforms.
  145. 2.6. Timeouts and persistent events work together.
  146. Previously, it wasn't useful to set a timeout on a persistent event:
  147. the timeout would trigger once, and never again. This is not what
  148. applications tend to want. Instead, applications tend to want every
  149. triggering of the event to re-set the timeout. So now, if you set
  150. up an event like this:
  151. struct event *ev;
  152. struct timeval tv;
  153. ev = event_new(base, fd, EV_READ|EV_PERSIST, cb, NULL);
  154. tv.tv_sec = 1;
  155. tv.tv_usec = 0;
  156. event_add(ev, &tv);
  157. The callback 'cb' will be invoked whenever fd is ready to read, OR whenever
  158. a second has passed since the last invocation of cb.
  159. 2.7. Multiple events allowed per fd
  160. Older versions of Libevent allowed at most one EV_READ event and at most
  161. one EV_WRITE event per socket, per event base. This restriction is no
  162. longer present.
  163. 2.8. evthread_* functions for thread-safe structures.
  164. Libevent structures can now be built with locking support. This code
  165. makes it safe to add, remove, and activate events on an event base from a
  166. different thread. (Previously, if you wanted to write multithreaded code
  167. with Libevent, you could only an event_base or its events in one thread at
  168. a time.)
  169. If you want threading support and you're using pthreads, you can just
  170. call evthread_use_pthreads(). (You'll need to link against the
  171. libevent_pthreads library in addition to libevent_core. These functions are
  172. not in libevent_core.)
  173. If you want threading support and you're using Windows, you can just
  174. call evthread_use_windows_threads().
  175. If you are using some locking system besides Windows and pthreads, You
  176. can enable this on a per-event-base level by writing functions to
  177. implement mutexes, conditions, and thread IDs, and passing them to
  178. evthread_set_lock_callbacks and related functions in event2/thread.h.
  179. Once locking functions are enabled, every new event_base is created with a
  180. lock. You can prevent a single event_base from being built with a lock
  181. disabled by using the EVENT_BASE_FLAG_NOLOCK flag in its
  182. event_config. If an event_base is created with a lock, it is safe to call
  183. event_del, event_add, and event_active on its events from any thread. The
  184. event callbacks themselves are still all executed from the thread running
  185. the event loop.
  186. To make an evbuffer or a bufferevent object threadsafe, call its
  187. *_enable_locking() function.
  188. The HTTP api is not currently threadsafe.
  189. To build Libevent with threading support disabled, pass
  190. --disable-thread-support to the configure script.
  191. 2.9. Edge-triggered events on some backends.
  192. With some backends, it's now possible to add the EV_ET flag to an event
  193. in order to request that the event's semantics be edge-triggered. Right
  194. now, epoll and kqueue support this.
  195. The corresponding event_config feature is EV_FEATURE_ET; see 2.4 for more
  196. information.
  197. 2.10. Better support for huge numbers of timeouts
  198. The heap-based priority queue timer implementation for Libevent 1.4 is good
  199. for randomly distributed timeouts, but suboptimal if you have huge numbers
  200. of timeouts that all expire in the same amount of time after their
  201. creation. The new event_base_init_common_timeout() logic lets you signal
  202. that a given timeout interval will be very common, and should use a linked
  203. list implementation instead of a priority queue.
  204. 2.11. Improved debugging support
  205. It's been pretty easy to forget to delete all your events before you
  206. re-initialize them, or otherwise put Libevent in an internally inconsistent
  207. state. You can tell libevent to catch these and other common errors with
  208. the new event_enable_debug_mode() call. Just invoke it before you do
  209. any calls to other libevent functions, and it'll catch many common
  210. event-level errors in your code.
  211. 2.12. Functions to access all event fields
  212. So that you don't have to access the struct event fields directly, Libevent
  213. now provides accessor functions to retrieve everything from an event that
  214. you set during event_new() or event_assign().
  215. 3. Backend-specific and performance improvements.
  216. 3.1. Change-minimization on O(1) backends
  217. With previous versions of Libevent, if you called event_del() and
  218. event_add() repeatedly on a single event between trips to the backend's
  219. dispatch function, the backend might wind up making unnecessary calls or
  220. passing unnecessary data to the kernel. The new backend logic batches up
  221. redundant adds and deletes, and performs no more operations than necessary
  222. at the kernel level.
  223. This logic is on for the kqueue backend, and available (but off by
  224. default) for the epoll backend. To turn it on for the epoll backend,
  225. set the EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST flag in the
  226. event_base_cofig, or set the EVENT_EPOLL_USE_CHANGELIST environment
  227. variable. Doing this with epoll may result in weird bugs if you give
  228. any fds closed by dup() or its variants.
  229. 3.2. Improved notification on Linux
  230. When we need to wake the event loop up from another thread, we use
  231. an epollfd to do so, instead of a socketpair. This is supposed to be
  232. faster.
  233. 3.3. Windows: better support for everything
  234. Bufferevents on Windows can use a new mechanism (off-by-default; see below)
  235. to send their data via Windows overlapped IO and get their notifications
  236. via the IOCP API. This should be much faster than using event-based
  237. notification.
  238. Other functions throughout the code have been fixed to work more
  239. consistently with Windows. Libevent now builds on Windows using either
  240. mingw, or using MSVC (with nmake). Libevent works fine with UNICODE
  241. defined, or not.
  242. Data structures are a little smarter: our lookups from socket to pending
  243. event are now done with O(1) hash tables rather than O(lg n) red-black
  244. trees.
  245. Unfortunately, the main Windows backend is still select()-based: from
  246. testing the IOCP backends on the mailing list, it seems that there isn't
  247. actually a way to tell for certain whether a socket is writable with IOCP.
  248. Libevent 2.1 may add a multithreaded WaitForMultipleEvents-based
  249. backend for better performance with many inactive sockets and better
  250. integration with Windows events.
  251. 4. Improvements to evbuffers
  252. Libevent has long had an "evbuffer" implementation to wrap access to an
  253. input or output memory buffer. In previous versions, the implementation
  254. was very inefficient and lacked some desirable features. We've made many
  255. improvements in Libevent 2.0.
  256. 4.1. Chunked-memory internal representation
  257. Previously, each evbuffer was a huge chunk of memory. When we ran out of
  258. space in an evbuffer, we used realloc() to grow the chunk of memory. When
  259. data was misaligned, we used memmove to move the data back to the front
  260. of the buffer.
  261. Needless to say, this is a terrible interface for networked IO.
  262. Now, evbuffers are implemented as a linked list of memory chunks, like
  263. most Unix kernels use for network IO. (See Linux's skbuf interfaces,
  264. or *BSD's mbufs). Data is added at the end of the linked list and
  265. removed from the front, so that we don't ever need realloc huge chunks
  266. or memmove the whole buffer contents.
  267. To avoid excessive calls to read and write, we use the readv/writev
  268. interfaces (or WSASend/WSARecv on Windows) to do IO on multiple chunks at
  269. once with a single system call.
  270. COMPATIBILITY NOTE:
  271. The evbuffer struct is no longer exposed in a header. The code here is
  272. too volatile to expose an official evbuffer structure, and there was never
  273. any means provided to create an evbuffer except via evbuffer_new which
  274. heap-allocated the buffer.
  275. If you need access to the whole buffer as a linear chunk of memory, the
  276. EVBUFFER_DATA() function still works. Watch out, though: it needs to copy
  277. the buffer's contents in a linear chunk before you can use it.
  278. 4.2. More flexible readline support
  279. The old evbuffer_readline() function (which accepted any sequence of
  280. CR and LF characters as a newline, and which couldn't handle lines
  281. containing NUL characters), is now deprecated. The preferred
  282. function is evbuffer_readln(), which supports a variety of
  283. line-ending styles, and which can return the number of characters in
  284. the line returned.
  285. You can also call evbuffer_search_eol() to find the end of a line
  286. in an evbuffer without ever extracting the line.
  287. 4.3. Support for file-based IO in evbuffers.
  288. You can now add chunks of a file into a evbuffer, and Libevent will have
  289. your OS use mapped-memory functionality, sendfile, or splice to transfer
  290. the data without ever copying it to userspace. On OSs where this is not
  291. supported, Libevent just loads the data.
  292. There are probably some bugs remaining in this code. On some platforms
  293. (like Windows), it just reads the relevant parts of the file into RAM.
  294. 4.4. Support for zero-copy ("scatter/gather") writes in evbuffers.
  295. You can add a piece of memory to an evbuffer without copying it.
  296. Instead, Libevent adds a new element to the evbuffer's linked list of
  297. chunks with a pointer to the memory you supplied. You can do this
  298. either with a reference-counted chunk (via evbuffer_add_reference), or
  299. by asking Libevent for a pointer to its internal vectors (via
  300. evbuffer_reserve_space or evbuffer_peek()).
  301. 4.5. Multiple callbacks per evbuffer
  302. Previously, you could only have one callback active on an evbuffer at a
  303. time. In practice, this meant that if one part of Libevent was using an
  304. evbuffer callback to notice when an internal evbuffer was reading or
  305. writing data, you couldn't have your own callback on that evbuffer.
  306. Now, you can now use the evbuffer_add_cb() function to add a callback that
  307. does not interfere with any other callbacks.
  308. The evbuffer_setcb() function is now deprecated.
  309. 4.6. New callback interface
  310. Previously, evbuffer callbacks were invoked with the old size of the
  311. buffer and the new size of the buffer. This interface could not capture
  312. operations that simultaneously filled _and_ drained a buffer, or handle
  313. cases where we needed to postpone callbacks until multiple operations were
  314. complete.
  315. Callbacks that are set with evbuffer_setcb still use the old API.
  316. Callbacks added with evbuffer_add_cb() use a new interface that takes a
  317. pointer to a struct holding the total number of bytes drained read and the
  318. total number of bytes written. See event2/buffer.h for full details.
  319. 4.7. Misc new evbuffer features
  320. You can use evbuffer_remove() to move a given number of bytes from one
  321. buffer to another.
  322. The evbuffer_search() function lets you search for repeated instances of
  323. a pattern inside an evbuffer.
  324. You can use evbuffer_freeze() to temporarily suspend drains from or adds
  325. to a given evbuffer. This is useful for code that exposes an evbuffer as
  326. part of its public API, but wants users to treat it as a pure source or
  327. sink.
  328. There's an evbuffer_copyout() that looks at the data at the start of an
  329. evbuffer without doing a drain.
  330. You can have an evbuffer defer all of its callbacks, so that rather than
  331. being invoked immediately when the evbuffer's length changes, they are
  332. invoked from within the event_loop. This is useful when you have a
  333. complex set of callbacks that can change the length of other evbuffers,
  334. and you want to avoid having them recurse and overflow your stack.
  335. 5. Bufferevents improvements
  336. Libevent has long included a "bufferevents" structure and related
  337. functions that were useful for generic buffered IO on a TCP connection.
  338. This is what Libevent uses for its HTTP implementation. In addition to
  339. the improvements that they get for free from the underlying evbuffer
  340. implementation above, there are many new features in Libevent 2.0's
  341. evbuffers.
  342. 5.1. New OO implementations
  343. The "bufferevent" structure is now an abstract base type with multiple
  344. implementations. This should not break existing code, which always
  345. allocated bufferevents with bufferevent_new().
  346. Current implementations of the bufferevent interface are described below.
  347. 5.2. bufferevent_socket_new() replaces bufferevent_new()
  348. Since bufferevents that use a socket are not the only kind,
  349. bufferevent_new() is now deprecated. Use bufferevent_socket_new()
  350. instead.
  351. 5.3. Filtered bufferevent IO
  352. You can use bufferevent_filter_new() to create a bufferevent that wraps
  353. around another bufferevent and transforms data it is sending and
  354. receiving. See test/regress_zlib.c for a toy example that uses zlib to
  355. compress data before sending it over a bufferevent.
  356. 5.3. Linked pairs of bufferevents
  357. You can use bufferevent_pair_new() to produce two linked
  358. bufferevents. This is like using socketpair, but doesn't require
  359. system-calls.
  360. 5.4. SSL support for bufferevents with OpenSSL
  361. There is now a bufferevent type that supports SSL/TLS using the
  362. OpenSSL library. The code for this is build in a separate
  363. library, libevent_openssl, so that your programs don't need to
  364. link against OpenSSL unless they actually want SSL support.
  365. There are two ways to construct one of these bufferevents, both
  366. declared in <event2/bufferevent_ssl.h>. If you want to wrap an
  367. SSL layer around an existing bufferevent, you would call the
  368. bufferevent_openssl_filter_new() function. If you want to do SSL
  369. on a socket directly, call bufferevent_openssl_socket_new().
  370. 5.5. IOCP support for bufferevents on Windows
  371. There is now a bufferevents backend that supports IOCP on Windows.
  372. Supposedly, this will eventually make Windows IO much faster for
  373. programs using bufferevents. We'll have to see; the code is not
  374. currently optimized at all. To try it out, call the
  375. event_base_start_iocp() method on an event_base before contructing
  376. bufferevents.
  377. This is tricky code; there are probably some bugs hiding here.
  378. 5.6. Improved connect support for bufferevents.
  379. You can now create a bufferevent that is not yet connected to any
  380. host, and tell it to connect, either by address or by hostname.
  381. The functions to do this are bufferevent_socket_connect and
  382. bufferevent_socket_connect_hostname.
  383. 5.7. Rate-limiting for bufferevents
  384. If you need to limit the number of bytes read/written by a single
  385. bufferevent, or by a group of them, you can do this with a new set of
  386. bufferevent rate-limiting calls.
  387. 6. Other improvements
  388. 6.1. DNS improvements
  389. 6.1.1. DNS: IPv6 nameservers
  390. The evdns code now lets you have nameservers whose addresses are IPv6.
  391. 6.1.2. DNS: Better security
  392. Libevent 2.0 tries harder to resist DNS answer-sniping attacks than
  393. earlier versions of evdns. See comments in the code for full details.
  394. Notably, evdns now supports the "0x20 hack" to make it harder to
  395. impersonate a DNS server. Additionally, Libevent now uses a strong
  396. internal RNG to generate DNS transaction IDs, so you don't need to supply
  397. your own.
  398. 6.1.3. DNS: Getaddrinfo support
  399. There's now an asynchronous getaddrinfo clone, evdns_getaddrinfo(),
  400. to make the results of the evdns functions more usable. It doesn't
  401. support every feature of a typical platform getaddrinfo() yet, but it
  402. is quite close.
  403. There is also a blocking evutil_getaddrinfo() declared in
  404. event2/util.h, to provide a getaddrinfo() implementation for
  405. platforms that don't have one, and smooth over the differences in
  406. various platforms implementations of RFC3493.
  407. Bufferevents provide bufferevent_connect_hostname(), which combines
  408. the name lookup and connect operations.
  409. 6.1.4. DNS: No more evdns globals
  410. Like an event base, evdns operations are now supposed to use an evdns_base
  411. argument. This makes them easier to wrap for other (more OO) languages,
  412. and easier to control the lifetime of. The old evdns functions will
  413. still, of course, continue working.
  414. 6.2. Listener support
  415. You can now more easily automate setting up a bound socket to listen for
  416. TCP connections. Just use the evconnlistener_*() functions in the
  417. event2/listener.h header.
  418. The listener code supports IOCP on Windows if available.
  419. 6.3. Secure RNG support
  420. Network code very frequently needs a secure, hard-to-predict random number
  421. generator. Some operating systems provide a good C implementation of one;
  422. others do not. Libevent 2.0 now provides a consistent implementation
  423. based on the arc4random code originally from OpenBSD. Libevent (and you)
  424. can use the evutil_secure_rng_*() functions to access a fairly secure
  425. random stream of bytes.
  426. 6.4. HTTP
  427. The evhttp uriencoding and uridecoding APIs have updated versions
  428. that behave more correctly, and can handle strings with internal NULs.
  429. The evhttp query parsing and URI parsing logic can now detect errors
  430. more usefully. Moreover, we include an actual URI parsing function
  431. (evhttp_uri_parse()) to correctly parse URIs, so as to discourage
  432. people from rolling their own ad-hoc parsing functions.
  433. There are now accessor functions for the useful fields of struct http
  434. and friends; it shouldn't be necessary to access them directly any
  435. more.
  436. Libevent now lets you declare support for all specified HTTP methods,
  437. including OPTIONS, PATCH, and so on. The default list is unchanged.
  438. Numerous evhttp bugs also got fixed.
  439. 7. Infrastructure improvements
  440. 7.1. Better unit test framework
  441. We now use a unit test framework that Nick wrote called "tinytest".
  442. The main benefit from Libevent's point of view is that tests which
  443. might mess with global state can all run each in their own
  444. subprocess. This way, when there's a bug that makes one unit test
  445. crash or mess up global state, it doesn't affect any others.
  446. 7.2. Better unit tests
  447. Despite all the code we've added, our unit tests are much better than
  448. before. Right now, iterating over the different backends on various
  449. platforms, I'm getting between 78% and 81% test coverage, compared
  450. with less than 45% test coverage in Libevent 1.4.