From: Nick Mathewson Date: Tue, 5 Jul 2011 19:07:07 +0000 (-0400) Subject: Merge remote-tracking branch 'github/21_end_of_buffer' X-Git-Tag: release-2.1.1-alpha~237 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d08a28c1c8140491084186cbbce8135814f0e0f;p=libevent Merge remote-tracking branch 'github/21_end_of_buffer' Conflicts: include/event2/buffer.h --- 7d08a28c1c8140491084186cbbce8135814f0e0f diff --cc include/event2/buffer.h index b5acbb5b,40e49dcb..66cd3d13 --- a/include/event2/buffer.h +++ b/include/event2/buffer.h @@@ -86,25 -75,15 +86,35 @@@ extern "C" #endif #include -struct evbuffer; +/** + An evbuffer is an opaque data type for efficiently buffering data to be + sent or received on the network. + + @see event2/event.h for more information +*/ +struct evbuffer +#ifdef _EVENT_IN_DOXYGEN +{} +#endif +; + +/** + Pointer to a position within an evbuffer. + + Used when repeatedly searching through a buffer. Calling any function + that modifies or re-packs the buffer contents may invalidate all + evbuffer_ptrs for that buffer. Do not modify these values except with + evbuffer_ptr_set. + -/** Points to a position within an evbuffer. Used when repeatedly searching - through a buffer. Calls to any function that modifies or re-packs the - buffer contents may invalidate all evbuffer_ptrs for that buffer. Do not - modify these values except with evbuffer_ptr_set. ++ Used when repeatedly searching through a buffer. Calls to any function ++ that modifies or re-packs the buffer contents may invalidate all ++ evbuffer_ptrs for that buffer. Do not modify these values except with ++ evbuffer_ptr_set. + + An evbuffer_ptr can represent any position from the start of a buffer up + to a position immediately after the end of a buffer. ++ ++ @see evbuffer_ptr_set() */ struct evbuffer_ptr { ev_ssize_t pos; @@@ -421,17 -376,9 +432,9 @@@ int evbuffer_add_reference(struct evbuf @param outbuf the output buffer @param fd the file descriptor - <<<<<<< HEAD -- @param off the offset from which to read data ++ @param offset the offset from which to read data @param length how much data to read, or -1 to read as much as possible. (-1 requires that 'fd' support fstat.) - ||||||| merged common ancestors - @param off the offset from which to read data - @param length how much data to read - ======= - @param offset the offset from which to read data - @param length how much data to read - >>>>>>> origin/patches-2.0 @return 0 if successful, or -1 if an error occurred */