\hypertarget{classXrlPFSTCPSender}{
\section{XrlPFSTCPSender Class Reference}
\label{classXrlPFSTCPSender}\index{XrlPFSTCPSender@{XrlPFSTCPSender}}
}


Sender of Xrls by TCP.  




{\ttfamily \#include $<$xrl\_\-pf\_\-stcp.hh$>$}

Inheritance diagram for XrlPFSTCPSender:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4.000000cm]{classXrlPFSTCPSender}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlPFSTCPSender_a686d2e95cdeb59d55f0eb8b82e61b3e6}{
{\bfseries XrlPFSTCPSender} (const string \&name, \hyperlink{classEventLoop}{EventLoop} \&e, const char $\ast$address=0, \hyperlink{classTimeVal}{TimeVal} keepalive\_\-period=DEFAULT\_\-SENDER\_\-KEEPALIVE\_\-PERIOD)  throw (XrlPFConstructorError)}
\label{classXrlPFSTCPSender_a686d2e95cdeb59d55f0eb8b82e61b3e6}

\item 
\hypertarget{classXrlPFSTCPSender_a72c957f878348782efdf46f8796e3adb}{
{\bfseries XrlPFSTCPSender} (const string \&name, \hyperlink{classEventLoop}{EventLoop} $\ast$e, const char $\ast$address=0, \hyperlink{classTimeVal}{TimeVal} keepalive\_\-period=DEFAULT\_\-SENDER\_\-KEEPALIVE\_\-PERIOD)}
\label{classXrlPFSTCPSender_a72c957f878348782efdf46f8796e3adb}

\item 
bool \hyperlink{classXrlPFSTCPSender_a1254b6396832842fc518628102335049}{send} (const \hyperlink{classXrl}{Xrl} \&x, bool direct\_\-call, const XrlPFSender::SendCallback \&cb)
\begin{DoxyCompactList}\small\item\em \hyperlink{structSend}{Send} an \hyperlink{classXrl}{Xrl}. \item\end{DoxyCompactList}\item 
\hypertarget{classXrlPFSTCPSender_ab478e074dbab3e3aa91db145712575be}{
bool {\bfseries sends\_\-pending} () const }
\label{classXrlPFSTCPSender_ab478e074dbab3e3aa91db145712575be}

\item 
bool \hyperlink{classXrlPFSTCPSender_a17cb1bbab3eda0912acf8c2eb5c2780c}{alive} () const 
\begin{DoxyCompactList}\small\item\em Determine if \hyperlink{protocolthe-p}{the} underlying transport is still open. \item\end{DoxyCompactList}\item 
\hypertarget{classXrlPFSTCPSender_ad2f9122772ff30caf47d92d4eff2291e}{
virtual const char $\ast$ {\bfseries protocol} () const }
\label{classXrlPFSTCPSender_ad2f9122772ff30caf47d92d4eff2291e}

\item 
\hypertarget{classXrlPFSTCPSender_a168c2ab246acb7140f2c97897daf9ba0}{
void {\bfseries set\_\-keepalive\_\-time} (const \hyperlink{classTimeVal}{TimeVal} \&time)}
\label{classXrlPFSTCPSender_a168c2ab246acb7140f2c97897daf9ba0}

\item 
\hypertarget{classXrlPFSTCPSender_a6f8b749c59d6bb0e5a8fd41b92ce1be2}{
const \hyperlink{classTimeVal}{TimeVal} \& {\bfseries keepalive\_\-time} () const }
\label{classXrlPFSTCPSender_a6f8b749c59d6bb0e5a8fd41b92ce1be2}

\item 
\hypertarget{classXrlPFSTCPSender_a11fd0133cc766131421bd6af5feb87dc}{
virtual string {\bfseries toString} () const }
\label{classXrlPFSTCPSender_a11fd0133cc766131421bd6af5feb87dc}

\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlPFSTCPSender_a04fb57968371c258fc29cad08c642c22}{
static const char $\ast$ {\bfseries protocol\_\-name} ()}
\label{classXrlPFSTCPSender_a04fb57968371c258fc29cad08c642c22}

\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlPFSTCPSender_ae0999579baf62e23ef728bfda51442e2}{
static const \hyperlink{classTimeVal}{TimeVal} {\bfseries DEFAULT\_\-SENDER\_\-KEEPALIVE\_\-PERIOD} = \hyperlink{classTimeVal}{TimeVal}(10, 0)}
\label{classXrlPFSTCPSender_ae0999579baf62e23ef728bfda51442e2}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlPFSTCPSender_aeb73b5890566cf38d00b851bb3b1c6fe}{
void {\bfseries construct} ()}
\label{classXrlPFSTCPSender_aeb73b5890566cf38d00b851bb3b1c6fe}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlPFSTCPSender_aba8645f87d85847313ab203585a67cb5}{
\hyperlink{classXorpFd}{XorpFd} {\bfseries \_\-sock}}
\label{classXrlPFSTCPSender_aba8645f87d85847313ab203585a67cb5}

\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlPFSTCPSender_ad8fa6b3f55ea25b8d4f4568d41d480d8}{
typedef map$<$ uint32\_\-t, \hyperlink{classref__ptr}{ref\_\-ptr}$<$ \hyperlink{classRequestState}{RequestState} $>$ $>$ {\bfseries RequestMap}}
\label{classXrlPFSTCPSender_ad8fa6b3f55ea25b8d4f4568d41d480d8}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlPFSTCPSender_ae8c97fc6c07deb6b441399a7be058956}{
void {\bfseries die} (const char $\ast$reason, bool verbose=true)}
\label{classXrlPFSTCPSender_ae8c97fc6c07deb6b441399a7be058956}

\item 
\hypertarget{classXrlPFSTCPSender_a52888b6c8f657cd494f84ccf59d0f19d}{
void {\bfseries update\_\-writer} (AsyncFileWriter::Event e, const uint8\_\-t $\ast$buffer, size\_\-t buffer\_\-bytes, size\_\-t bytes\_\-done)}
\label{classXrlPFSTCPSender_a52888b6c8f657cd494f84ccf59d0f19d}

\item 
\hypertarget{classXrlPFSTCPSender_ae2021077fabec52dd7b1508874dbfdfe}{
\hyperlink{classRequestState}{RequestState} $\ast$ {\bfseries find\_\-request} (uint32\_\-t seqno)}
\label{classXrlPFSTCPSender_ae2021077fabec52dd7b1508874dbfdfe}

\item 
\hypertarget{classXrlPFSTCPSender_aa5084d19f06b095ea379877ae66f3e7c}{
void {\bfseries read\_\-event} (\hyperlink{classBufferedAsyncReader}{BufferedAsyncReader} $\ast$reader, BufferedAsyncReader::Event ev, uint8\_\-t $\ast$buffer, size\_\-t buffer\_\-bytes)}
\label{classXrlPFSTCPSender_aa5084d19f06b095ea379877ae66f3e7c}

\item 
\hypertarget{classXrlPFSTCPSender_a0b034506c387be117b018e23bd8a7ec5}{
void {\bfseries send\_\-request} (\hyperlink{classRequestState}{RequestState} $\ast$)}
\label{classXrlPFSTCPSender_a0b034506c387be117b018e23bd8a7ec5}

\item 
\hypertarget{classXrlPFSTCPSender_a7ac83d42447390ff548f6369e9b73682}{
void {\bfseries dispose\_\-request} (RequestMap::iterator ptr)}
\label{classXrlPFSTCPSender_a7ac83d42447390ff548f6369e9b73682}

\item 
\hypertarget{classXrlPFSTCPSender_a8037c4c3b5d4af10e5ead09cabc8057b}{
void {\bfseries start\_\-keepalives} ()}
\label{classXrlPFSTCPSender_a8037c4c3b5d4af10e5ead09cabc8057b}

\item 
\hypertarget{classXrlPFSTCPSender_a7af3b0743edd51abf0fe73da0d340703}{
void {\bfseries stop\_\-keepalives} ()}
\label{classXrlPFSTCPSender_a7af3b0743edd51abf0fe73da0d340703}

\item 
\hypertarget{classXrlPFSTCPSender_af19fb9ef0bbd1d88e23d185dfc74eb25}{
void {\bfseries defer\_\-keepalives} ()}
\label{classXrlPFSTCPSender_af19fb9ef0bbd1d88e23d185dfc74eb25}

\item 
\hypertarget{classXrlPFSTCPSender_a1f5e475acf5dd026251d4ec67ba730cd}{
bool {\bfseries send\_\-keepalive} ()}
\label{classXrlPFSTCPSender_a1f5e475acf5dd026251d4ec67ba730cd}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlPFSTCPSender_af15ac2ba62cc960971d1a5cf90875d52}{
uint32\_\-t {\bfseries \_\-uid}}
\label{classXrlPFSTCPSender_af15ac2ba62cc960971d1a5cf90875d52}

\item 
\hypertarget{classXrlPFSTCPSender_a9cf73124337620a22d3324cbd29d1cad}{
\hyperlink{classAsyncFileWriter}{AsyncFileWriter} $\ast$ {\bfseries \_\-writer}}
\label{classXrlPFSTCPSender_a9cf73124337620a22d3324cbd29d1cad}

\item 
\hypertarget{classXrlPFSTCPSender_a84df49ec0827b928c0add21e2dae451d}{
list$<$ \hyperlink{classref__ptr}{ref\_\-ptr}$<$ \hyperlink{classRequestState}{RequestState} $>$ $>$ {\bfseries \_\-requests\_\-waiting}}
\label{classXrlPFSTCPSender_a84df49ec0827b928c0add21e2dae451d}

\item 
\hypertarget{classXrlPFSTCPSender_a6372158d78d983b671372ceaf8329052}{
RequestMap {\bfseries \_\-requests\_\-sent}}
\label{classXrlPFSTCPSender_a6372158d78d983b671372ceaf8329052}

\item 
\hypertarget{classXrlPFSTCPSender_acd491805a80b74a2e4a0a5e88092ad1b}{
uint32\_\-t {\bfseries \_\-current\_\-seqno}}
\label{classXrlPFSTCPSender_acd491805a80b74a2e4a0a5e88092ad1b}

\item 
\hypertarget{classXrlPFSTCPSender_ae8096abb23ecd119a84fd4819e8779ab}{
size\_\-t {\bfseries \_\-active\_\-bytes}}
\label{classXrlPFSTCPSender_ae8096abb23ecd119a84fd4819e8779ab}

\item 
\hypertarget{classXrlPFSTCPSender_a7f850b5c986b166c00798ababe317e20}{
size\_\-t {\bfseries \_\-active\_\-requests}}
\label{classXrlPFSTCPSender_a7f850b5c986b166c00798ababe317e20}

\item 
\hypertarget{classXrlPFSTCPSender_a141534e73b610fa640bf26e04ec10c4b}{
\hyperlink{classTimeVal}{TimeVal} {\bfseries \_\-keepalive\_\-time}}
\label{classXrlPFSTCPSender_a141534e73b610fa640bf26e04ec10c4b}

\item 
\hypertarget{classXrlPFSTCPSender_a18062c171b67ff066f2cd27a42bfa52f}{
\hyperlink{classBufferedAsyncReader}{BufferedAsyncReader} $\ast$ {\bfseries \_\-reader}}
\label{classXrlPFSTCPSender_a18062c171b67ff066f2cd27a42bfa52f}

\item 
\hypertarget{classXrlPFSTCPSender_a45e71ca57ee65533ac90f23f17b9fa2c}{
vector$<$ uint8\_\-t $>$ {\bfseries \_\-reply}}
\label{classXrlPFSTCPSender_a45e71ca57ee65533ac90f23f17b9fa2c}

\item 
\hypertarget{classXrlPFSTCPSender_a3f2a5dea762c53360100d3a20eba0f51}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-keepalive\_\-timer}}
\label{classXrlPFSTCPSender_a3f2a5dea762c53360100d3a20eba0f51}

\item 
\hypertarget{classXrlPFSTCPSender_a484b7ba0059e0b9219adbe13530a0ea1}{
\hyperlink{classTimeVal}{TimeVal} {\bfseries \_\-keepalive\_\-last\_\-fired}}
\label{classXrlPFSTCPSender_a484b7ba0059e0b9219adbe13530a0ea1}

\item 
\hypertarget{classXrlPFSTCPSender_a19d530e71399acea66b0eb68182de0e6}{
bool {\bfseries \_\-keepalive\_\-sent}}
\label{classXrlPFSTCPSender_a19d530e71399acea66b0eb68182de0e6}

\end{DoxyCompactItemize}
\subsection*{Static Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlPFSTCPSender_a52049264a70642b912b43b7c4bf02580}{
static const char $\ast$ {\bfseries \_\-protocol} = \char`\"{}stcp\char`\"{}}
\label{classXrlPFSTCPSender_a52049264a70642b912b43b7c4bf02580}

\item 
\hypertarget{classXrlPFSTCPSender_a5be3c9e5bc699a10a2810704eb443184}{
static uint32\_\-t {\bfseries \_\-next\_\-uid} = 0}
\label{classXrlPFSTCPSender_a5be3c9e5bc699a10a2810704eb443184}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Sender of Xrls by TCP. 

\subsection{Member Function Documentation}
\hypertarget{classXrlPFSTCPSender_a17cb1bbab3eda0912acf8c2eb5c2780c}{
\index{XrlPFSTCPSender@{XrlPFSTCPSender}!alive@{alive}}
\index{alive@{alive}!XrlPFSTCPSender@{XrlPFSTCPSender}}
\subsubsection[{alive}]{\setlength{\rightskip}{0pt plus 5cm}bool XrlPFSTCPSender::alive (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classXrlPFSTCPSender_a17cb1bbab3eda0912acf8c2eb5c2780c}


Determine if \hyperlink{protocolthe-p}{the} underlying transport is still open. 

\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} transport is alive. 
\end{DoxyReturn}


Implements \hyperlink{classXrlPFSender_a2fd3fb9bfcebed75807562ba96eb9df6}{XrlPFSender}.

\hypertarget{classXrlPFSTCPSender_a1254b6396832842fc518628102335049}{
\index{XrlPFSTCPSender@{XrlPFSTCPSender}!send@{send}}
\index{send@{send}!XrlPFSTCPSender@{XrlPFSTCPSender}}
\subsubsection[{send}]{\setlength{\rightskip}{0pt plus 5cm}bool XrlPFSTCPSender::send (
\begin{DoxyParamCaption}
\item[{const {\bf Xrl} \&}]{xrl, }
\item[{bool}]{direct\_\-call, }
\item[{const XrlPFSender::SendCallback \&}]{cb}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classXrlPFSTCPSender_a1254b6396832842fc518628102335049}


\hyperlink{structSend}{Send} an \hyperlink{classXrl}{Xrl}. 

This method attempts to perform \hyperlink{protocolthe-p}{the} sender side processing of an XRL.

If a direct\_\-call \hyperlink{protocolthe-p}{the} method will return true or false to indicate success to \hyperlink{protocolthe-p}{the} caller. If not a direct call, a failure will be communicated via a callback since there's no way to get \hyperlink{protocolthe-p}{the} information directly back to \hyperlink{protocolthe-p}{the} caller.


\begin{DoxyParams}{Parameters}
{\em xrl} & XRL to be sent. \\
\hline
{\em direct\_\-call} & indication of whether \hyperlink{protocolthe-p}{the} caller is on \hyperlink{protocolthe-p}{the} stack. \\
\hline
{\em cb} & Callback to be invoked with result. \\
\hline
\end{DoxyParams}


Implements \hyperlink{classXrlPFSender_a078721d7d84771719ea2470e34267d07}{XrlPFSender}.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/libxipc/xrl\_\-pf\_\-stcp.hh\item 
/home/greearb/git/xorp.ct.github/xorp/libxipc/xrl\_\-pf\_\-stcp.cc\end{DoxyCompactItemize}
