|
Libevent Code Doxygen document
|

Public Member Functions | |
| LIST_HEAD (evbuffer_cb_queue, evbuffer_cb_entry) callbacks | |
Public Attributes | |
| struct evbuffer_chain * | first |
| struct evbuffer_chain * | last |
| struct evbuffer_chain ** | last_with_datap |
| size_t | total_len |
| size_t | n_add_for_cb |
| size_t | n_del_for_cb |
| void * | lock |
| unsigned | own_lock: 1 |
| unsigned | freeze_start: 1 |
| unsigned | freeze_end: 1 |
| unsigned | deferred_cbs: 1 |
| ev_uint32_t | flags |
| struct event_base * | cb_queue |
| int | refcnt |
| struct event_callback | deferred |
| struct bufferevent * | parent |
| evbuffer::LIST_HEAD | ( | evbuffer_cb_queue | , |
| evbuffer_cb_entry | |||
| ) |
A doubly-linked-list of callback functions
| struct event_base* evbuffer::cb_queue |
Used to implement deferred callbacks.
| struct event_callback evbuffer::deferred |
A struct event_callback handle to make all of this buffer's callbacks invoked from the event loop.
| unsigned evbuffer::deferred_cbs |
True iff this evbuffer's callbacks are not invoked immediately upon a change in the buffer, but instead are deferred to be invoked from the event_base's loop. Useful for preventing enormous stack overflows when we have mutually recursive callbacks, and for serializing callbacks in a single thread.
| struct evbuffer_chain* evbuffer::first |
The first chain in this buffer's linked list of chains.
| ev_uint32_t evbuffer::flags |
Zero or more EVBUFFER_FLAG_* bits
| unsigned evbuffer::freeze_end |
True iff we should not allow changes to the end of the buffer (appends)
| unsigned evbuffer::freeze_start |
True iff we should not allow changes to the front of the buffer (drains or prepends).
| struct evbuffer_chain* evbuffer::last |
The last chain in this buffer's linked list of chains.
| struct evbuffer_chain** evbuffer::last_with_datap |
Pointer to the next pointer pointing at the 'last_with_data' chain.
To unpack:
The last_with_data chain is the last chain that has any data in it. If all chains in the buffer are empty, it is the first chain. If the buffer has no chains, it is NULL.
The last_with_datap pointer points at whatever 'next' pointer pointing at the last_with_data chain. If the last_with_data chain is the first chain, or it is NULL, then the last_with_datap pointer is &buf->first.
| void* evbuffer::lock |
A lock used to mediate access to this buffer.
| size_t evbuffer::n_add_for_cb |
Number of bytes we have added to the buffer since we last tried to invoke callbacks.
| size_t evbuffer::n_del_for_cb |
Number of bytes we have removed from the buffer since we last tried to invoke callbacks.
| unsigned evbuffer::own_lock |
True iff we should free the lock field when we free this evbuffer.
| struct bufferevent* evbuffer::parent |
The parent bufferevent object this evbuffer belongs to. NULL if the evbuffer stands alone.
| int evbuffer::refcnt |
A reference count on this evbuffer. When the reference count reaches 0, the buffer is destroyed. Manipulated with evbuffer_incref and evbuffer_decref_and_unlock and evbuffer_free.
| size_t evbuffer::total_len |
Total amount of bytes stored in all chains.