\hypertarget{structevbuffer}{\section{evbuffer Struct Reference}
\label{structevbuffer}\index{evbuffer@{evbuffer}}
}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{structevbuffer_ac5a3cd85daf0a972fcfe894a1c557d62}{\hyperlink{structevbuffer_ac5a3cd85daf0a972fcfe894a1c557d62}{T\+A\+I\+L\+Q\+\_\+\+H\+E\+A\+D} (evbuffer\+\_\+cb\+\_\+queue, \hyperlink{structevbuffer__cb__entry}{evbuffer\+\_\+cb\+\_\+entry}) callbacks}\label{structevbuffer_ac5a3cd85daf0a972fcfe894a1c557d62}

\begin{DoxyCompactList}\small\item\em A doubly-\/linked-\/list of callback functions. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structevbuffer__chain}{evbuffer\+\_\+chain} $\ast$ \hyperlink{structevbuffer_a590cd5dc76dfecc57b45262d65fa1106}{first}
\begin{DoxyCompactList}\small\item\em The first chain in this buffer's linked list of chains. \end{DoxyCompactList}\item 
struct \hyperlink{structevbuffer__chain}{evbuffer\+\_\+chain} $\ast$ \hyperlink{structevbuffer_aada4ae960b5f60ac937cd8488dafc849}{last}
\begin{DoxyCompactList}\small\item\em The last chain in this buffer's linked list of chains. \end{DoxyCompactList}\item 
struct \hyperlink{structevbuffer__chain}{evbuffer\+\_\+chain} $\ast$$\ast$ \hyperlink{structevbuffer_aa89b72c7086750d7b6c91902e2f1bf21}{last\+\_\+with\+\_\+datap}
\begin{DoxyCompactList}\small\item\em Pointer to the next pointer pointing at the 'last\+\_\+with\+\_\+data' chain. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{structevbuffer_af432b67ab2e1b3dd8b96e314a0785116}{total\+\_\+len}
\begin{DoxyCompactList}\small\item\em Total amount of bytes stored in all chains. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{structevbuffer_ab2953dce6411c80514f7c787b311725c}{n\+\_\+add\+\_\+for\+\_\+cb}
\begin{DoxyCompactList}\small\item\em Number of bytes we have added to the buffer since we last tried to invoke callbacks. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{structevbuffer_a5f4fd4011a0461e5fbee4e417031a960}{n\+\_\+del\+\_\+for\+\_\+cb}
\begin{DoxyCompactList}\small\item\em Number of bytes we have removed from the buffer since we last tried to invoke callbacks. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{structevbuffer_a23672b71d57713bae7652e4109dc9e73}{lock}
\begin{DoxyCompactList}\small\item\em A lock used to mediate access to this buffer. \end{DoxyCompactList}\item 
unsigned \hyperlink{structevbuffer_a188a8ed665c96f3c318d752a06870cdb}{own\+\_\+lock}\+: 1
\begin{DoxyCompactList}\small\item\em True iff we should free the lock field when we free this evbuffer. \end{DoxyCompactList}\item 
unsigned \hyperlink{structevbuffer_a082d569d992120cf9ff28ddb0f5da313}{freeze\+\_\+start}\+: 1
\begin{DoxyCompactList}\small\item\em True iff we should not allow changes to the front of the buffer (drains or prepends). \end{DoxyCompactList}\item 
\hypertarget{structevbuffer_a6bed33d6f3074d83a5c39a21b3acbaf1}{unsigned \hyperlink{structevbuffer_a6bed33d6f3074d83a5c39a21b3acbaf1}{freeze\+\_\+end}\+: 1}\label{structevbuffer_a6bed33d6f3074d83a5c39a21b3acbaf1}

\begin{DoxyCompactList}\small\item\em True iff we should not allow changes to the end of the buffer (appends) \end{DoxyCompactList}\item 
unsigned \hyperlink{structevbuffer_a62c8ccc8ee7f824901ace54587681b13}{deferred\+\_\+cbs}\+: 1
\begin{DoxyCompactList}\small\item\em 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 \hyperlink{structevent__base}{event\+\_\+base}'s loop. \end{DoxyCompactList}\item 
struct \hyperlink{structdeferred__cb__queue}{deferred\+\_\+cb\+\_\+queue} $\ast$ \hyperlink{structevbuffer_a7875f8f4bfdb1fc986bfd44debafa3af}{cb\+\_\+queue}
\begin{DoxyCompactList}\small\item\em Used to implement deferred callbacks. \end{DoxyCompactList}\item 
int \hyperlink{structevbuffer_a84f258913691bdcc10456cfe78fe9440}{refcnt}
\begin{DoxyCompactList}\small\item\em A reference count on this evbuffer. \end{DoxyCompactList}\item 
struct \hyperlink{structdeferred__cb}{deferred\+\_\+cb} \hyperlink{structevbuffer_a7e7326076d6acdddb74a138e0e2c49d4}{deferred}
\begin{DoxyCompactList}\small\item\em A \hyperlink{structdeferred__cb}{deferred\+\_\+cb} handle to make all of this buffer's callbacks invoked from the event loop. \end{DoxyCompactList}\item 
struct \hyperlink{structbufferevent}{bufferevent} $\ast$ \hyperlink{structevbuffer_acc2fc2823057650c10b7133a8282d153}{parent}
\begin{DoxyCompactList}\small\item\em The parent bufferevent object this evbuffer belongs to. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Field Documentation}
\hypertarget{structevbuffer_a7875f8f4bfdb1fc986bfd44debafa3af}{\index{evbuffer@{evbuffer}!cb\+\_\+queue@{cb\+\_\+queue}}
\index{cb\+\_\+queue@{cb\+\_\+queue}!evbuffer@{evbuffer}}
\subsubsection[{cb\+\_\+queue}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf deferred\+\_\+cb\+\_\+queue}$\ast$ evbuffer\+::cb\+\_\+queue}}\label{structevbuffer_a7875f8f4bfdb1fc986bfd44debafa3af}


Used to implement deferred callbacks. 



Referenced by evbuffer\+\_\+defer\+\_\+callbacks().

\hypertarget{structevbuffer_a7e7326076d6acdddb74a138e0e2c49d4}{\index{evbuffer@{evbuffer}!deferred@{deferred}}
\index{deferred@{deferred}!evbuffer@{evbuffer}}
\subsubsection[{deferred}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf deferred\+\_\+cb} evbuffer\+::deferred}}\label{structevbuffer_a7e7326076d6acdddb74a138e0e2c49d4}


A \hyperlink{structdeferred__cb}{deferred\+\_\+cb} handle to make all of this buffer's callbacks invoked from the event loop. 



Referenced by evbuffer\+\_\+defer\+\_\+callbacks().

\hypertarget{structevbuffer_a62c8ccc8ee7f824901ace54587681b13}{\index{evbuffer@{evbuffer}!deferred\+\_\+cbs@{deferred\+\_\+cbs}}
\index{deferred\+\_\+cbs@{deferred\+\_\+cbs}!evbuffer@{evbuffer}}
\subsubsection[{deferred\+\_\+cbs}]{\setlength{\rightskip}{0pt plus 5cm}unsigned evbuffer\+::deferred\+\_\+cbs}}\label{structevbuffer_a62c8ccc8ee7f824901ace54587681b13}


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 \hyperlink{structevent__base}{event\+\_\+base}'s loop. 

Useful for preventing enormous stack overflows when we have mutually recursive callbacks, and for serializing callbacks in a single thread. 

Referenced by evbuffer\+\_\+defer\+\_\+callbacks().

\hypertarget{structevbuffer_a590cd5dc76dfecc57b45262d65fa1106}{\index{evbuffer@{evbuffer}!first@{first}}
\index{first@{first}!evbuffer@{evbuffer}}
\subsubsection[{first}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evbuffer\+\_\+chain}$\ast$ evbuffer\+::first}}\label{structevbuffer_a590cd5dc76dfecc57b45262d65fa1106}


The first chain in this buffer's linked list of chains. 



Referenced by evbuffer\+\_\+add\+\_\+buffer(), evbuffer\+\_\+copyout(), evbuffer\+\_\+drain(), evbuffer\+\_\+get\+\_\+contiguous\+\_\+space(), evbuffer\+\_\+launch\+\_\+write(), evbuffer\+\_\+new(), evbuffer\+\_\+overlapped\+\_\+new(), evbuffer\+\_\+peek(), evbuffer\+\_\+prepend(), evbuffer\+\_\+prepend\+\_\+buffer(), evbuffer\+\_\+ptr\+\_\+set(), evbuffer\+\_\+pullup(), evbuffer\+\_\+remove\+\_\+buffer(), and evbuffer\+\_\+write\+\_\+atmost().

\hypertarget{structevbuffer_a082d569d992120cf9ff28ddb0f5da313}{\index{evbuffer@{evbuffer}!freeze\+\_\+start@{freeze\+\_\+start}}
\index{freeze\+\_\+start@{freeze\+\_\+start}!evbuffer@{evbuffer}}
\subsubsection[{freeze\+\_\+start}]{\setlength{\rightskip}{0pt plus 5cm}unsigned evbuffer\+::freeze\+\_\+start}}\label{structevbuffer_a082d569d992120cf9ff28ddb0f5da313}


True iff we should not allow changes to the front of the buffer (drains or prepends). 



Referenced by evbuffer\+\_\+add\+\_\+buffer(), evbuffer\+\_\+copyout(), evbuffer\+\_\+drain(), evbuffer\+\_\+freeze(), evbuffer\+\_\+launch\+\_\+write(), evbuffer\+\_\+prepend(), evbuffer\+\_\+prepend\+\_\+buffer(), evbuffer\+\_\+readln(), evbuffer\+\_\+remove\+\_\+buffer(), evbuffer\+\_\+unfreeze(), and evbuffer\+\_\+write\+\_\+atmost().

\hypertarget{structevbuffer_aada4ae960b5f60ac937cd8488dafc849}{\index{evbuffer@{evbuffer}!last@{last}}
\index{last@{last}!evbuffer@{evbuffer}}
\subsubsection[{last}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evbuffer\+\_\+chain}$\ast$ evbuffer\+::last}}\label{structevbuffer_aada4ae960b5f60ac937cd8488dafc849}


The last chain in this buffer's linked list of chains. 



Referenced by evbuffer\+\_\+add(), evbuffer\+\_\+commit\+\_\+space(), evbuffer\+\_\+pullup(), and evbuffer\+\_\+remove\+\_\+buffer().

\hypertarget{structevbuffer_aa89b72c7086750d7b6c91902e2f1bf21}{\index{evbuffer@{evbuffer}!last\+\_\+with\+\_\+datap@{last\+\_\+with\+\_\+datap}}
\index{last\+\_\+with\+\_\+datap@{last\+\_\+with\+\_\+datap}!evbuffer@{evbuffer}}
\subsubsection[{last\+\_\+with\+\_\+datap}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evbuffer\+\_\+chain}$\ast$$\ast$ evbuffer\+::last\+\_\+with\+\_\+datap}}\label{structevbuffer_aa89b72c7086750d7b6c91902e2f1bf21}


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 N\+U\+L\+L.

The last\+\_\+with\+\_\+datap pointer points at {\itshape whatever 'next' pointer} points at the last\+\_\+with\+\_\+datap chain. If the last\+\_\+with\+\_\+data chain is the first chain, or it is N\+U\+L\+L, then the last\+\_\+with\+\_\+datap pointer is \&buf-\/$>$first. 

Referenced by evbuffer\+\_\+commit\+\_\+read(), evbuffer\+\_\+commit\+\_\+space(), evbuffer\+\_\+drain(), evbuffer\+\_\+new(), evbuffer\+\_\+overlapped\+\_\+new(), evbuffer\+\_\+prepend(), evbuffer\+\_\+pullup(), evbuffer\+\_\+read(), and evbuffer\+\_\+remove\+\_\+buffer().

\hypertarget{structevbuffer_a23672b71d57713bae7652e4109dc9e73}{\index{evbuffer@{evbuffer}!lock@{lock}}
\index{lock@{lock}!evbuffer@{evbuffer}}
\subsubsection[{lock}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ evbuffer\+::lock}}\label{structevbuffer_a23672b71d57713bae7652e4109dc9e73}


A lock used to mediate access to this buffer. 



Referenced by evbuffer\+\_\+enable\+\_\+locking().

\hypertarget{structevbuffer_ab2953dce6411c80514f7c787b311725c}{\index{evbuffer@{evbuffer}!n\+\_\+add\+\_\+for\+\_\+cb@{n\+\_\+add\+\_\+for\+\_\+cb}}
\index{n\+\_\+add\+\_\+for\+\_\+cb@{n\+\_\+add\+\_\+for\+\_\+cb}!evbuffer@{evbuffer}}
\subsubsection[{n\+\_\+add\+\_\+for\+\_\+cb}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t evbuffer\+::n\+\_\+add\+\_\+for\+\_\+cb}}\label{structevbuffer_ab2953dce6411c80514f7c787b311725c}


Number of bytes we have added to the buffer since we last tried to invoke callbacks. 



Referenced by evbuffer\+\_\+add(), evbuffer\+\_\+add\+\_\+buffer(), evbuffer\+\_\+add\+\_\+file(), evbuffer\+\_\+add\+\_\+reference(), evbuffer\+\_\+add\+\_\+vprintf(), evbuffer\+\_\+commit\+\_\+space(), evbuffer\+\_\+prepend(), evbuffer\+\_\+prepend\+\_\+buffer(), evbuffer\+\_\+read(), and evbuffer\+\_\+remove\+\_\+buffer().

\hypertarget{structevbuffer_a5f4fd4011a0461e5fbee4e417031a960}{\index{evbuffer@{evbuffer}!n\+\_\+del\+\_\+for\+\_\+cb@{n\+\_\+del\+\_\+for\+\_\+cb}}
\index{n\+\_\+del\+\_\+for\+\_\+cb@{n\+\_\+del\+\_\+for\+\_\+cb}!evbuffer@{evbuffer}}
\subsubsection[{n\+\_\+del\+\_\+for\+\_\+cb}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t evbuffer\+::n\+\_\+del\+\_\+for\+\_\+cb}}\label{structevbuffer_a5f4fd4011a0461e5fbee4e417031a960}


Number of bytes we have removed from the buffer since we last tried to invoke callbacks. 



Referenced by evbuffer\+\_\+add\+\_\+buffer(), evbuffer\+\_\+drain(), evbuffer\+\_\+prepend\+\_\+buffer(), and evbuffer\+\_\+remove\+\_\+buffer().

\hypertarget{structevbuffer_a188a8ed665c96f3c318d752a06870cdb}{\index{evbuffer@{evbuffer}!own\+\_\+lock@{own\+\_\+lock}}
\index{own\+\_\+lock@{own\+\_\+lock}!evbuffer@{evbuffer}}
\subsubsection[{own\+\_\+lock}]{\setlength{\rightskip}{0pt plus 5cm}unsigned evbuffer\+::own\+\_\+lock}}\label{structevbuffer_a188a8ed665c96f3c318d752a06870cdb}


True iff we should free the lock field when we free this evbuffer. 



Referenced by evbuffer\+\_\+enable\+\_\+locking().

\hypertarget{structevbuffer_acc2fc2823057650c10b7133a8282d153}{\index{evbuffer@{evbuffer}!parent@{parent}}
\index{parent@{parent}!evbuffer@{evbuffer}}
\subsubsection[{parent}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf bufferevent}$\ast$ evbuffer\+::parent}}\label{structevbuffer_acc2fc2823057650c10b7133a8282d153}


The parent bufferevent object this evbuffer belongs to. 

N\+U\+L\+L if the evbuffer stands alone. \hypertarget{structevbuffer_a84f258913691bdcc10456cfe78fe9440}{\index{evbuffer@{evbuffer}!refcnt@{refcnt}}
\index{refcnt@{refcnt}!evbuffer@{evbuffer}}
\subsubsection[{refcnt}]{\setlength{\rightskip}{0pt plus 5cm}int evbuffer\+::refcnt}}\label{structevbuffer_a84f258913691bdcc10456cfe78fe9440}


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. 

Referenced by evbuffer\+\_\+new(), and evbuffer\+\_\+overlapped\+\_\+new().

\hypertarget{structevbuffer_af432b67ab2e1b3dd8b96e314a0785116}{\index{evbuffer@{evbuffer}!total\+\_\+len@{total\+\_\+len}}
\index{total\+\_\+len@{total\+\_\+len}!evbuffer@{evbuffer}}
\subsubsection[{total\+\_\+len}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t evbuffer\+::total\+\_\+len}}\label{structevbuffer_af432b67ab2e1b3dd8b96e314a0785116}


Total amount of bytes stored in all chains. 



Referenced by evbuffer\+\_\+add(), evbuffer\+\_\+add\+\_\+buffer(), evbuffer\+\_\+add\+\_\+vprintf(), evbuffer\+\_\+commit\+\_\+read(), evbuffer\+\_\+commit\+\_\+space(), evbuffer\+\_\+copyout(), evbuffer\+\_\+drain(), evbuffer\+\_\+get\+\_\+length(), evbuffer\+\_\+launch\+\_\+write(), evbuffer\+\_\+prepend(), evbuffer\+\_\+prepend\+\_\+buffer(), evbuffer\+\_\+pullup(), evbuffer\+\_\+read(), evbuffer\+\_\+remove\+\_\+buffer(), and evbuffer\+\_\+write\+\_\+atmost().



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
opal/mca/event/libevent2013/libevent/evbuffer-\/internal.\+h\end{DoxyCompactItemize}
