\hypertarget{classFinderTcpBase}{
\section{FinderTcpBase Class Reference}
\label{classFinderTcpBase}\index{FinderTcpBase@{FinderTcpBase}}
}
Inheritance diagram for FinderTcpBase:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classFinderTcpBase}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classFinderTcpBase_a23a072de0b0518e29ffaaebe6615929a}{
{\bfseries FinderTcpBase} (\hyperlink{classEventLoop}{EventLoop} \&e, \hyperlink{classXorpFd}{XorpFd} fd)}
\label{classFinderTcpBase_a23a072de0b0518e29ffaaebe6615929a}

\item 
virtual bool \hyperlink{classFinderTcpBase_a7e42a4051b4baacf148755bc8f2a28e5}{read\_\-event} (int errval, const uint8\_\-t $\ast$data, uint32\_\-t data\_\-bytes)=0
\begin{DoxyCompactList}\small\item\em Method to be implemented by derived classes that is called when data arrives or an error occurs when processing when data arrives. \item\end{DoxyCompactList}\item 
void \hyperlink{classFinderTcpBase_a7b8f035331884f365153140d6d23fc27}{set\_\-read\_\-enabled} (bool en)
\begin{DoxyCompactList}\small\item\em Control whether read events can occur. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFinderTcpBase_a217f32614c3fa69978f47059fb6dc5bd}{read\_\-enabled} () const 
\begin{DoxyCompactList}\small\item\em Determine whether read events can occur. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFinderTcpBase_ad73a88fb000b1716100253ea338a8ce4}{write\_\-data} (const uint8\_\-t $\ast$data, uint32\_\-t data\_\-bytes)
\begin{DoxyCompactList}\small\item\em Write data on TCP connection. \item\end{DoxyCompactList}\item 
\hypertarget{classFinderTcpBase_a7633ff30af5d1c26879a3fdd61597447}{
bool {\bfseries write\_\-data} (const iovec $\ast$iov, uint32\_\-t iovcnt)}
\label{classFinderTcpBase_a7633ff30af5d1c26879a3fdd61597447}

\item 
virtual void \hyperlink{classFinderTcpBase_ac7f3903fd6ade715f647038ed12abce8}{write\_\-event} (int errval, const uint8\_\-t $\ast$data, uint32\_\-t data\_\-bytes)=0
\begin{DoxyCompactList}\small\item\em Method to be implemented by derived classes that is called when data writing completes or an error occurs when processing when write. \item\end{DoxyCompactList}\item 
\hypertarget{classFinderTcpBase_ab0ed4acc4d806b5cf90ff1e07849f26c}{
virtual void \hyperlink{classFinderTcpBase_ab0ed4acc4d806b5cf90ff1e07849f26c}{close\_\-event} ()}
\label{classFinderTcpBase_ab0ed4acc4d806b5cf90ff1e07849f26c}

\begin{DoxyCompactList}\small\item\em Method that may be implemented by derived classes for detecting when \hyperlink{protocolthe-p}{the} underlying socket is closed. \item\end{DoxyCompactList}\item 
\hypertarget{classFinderTcpBase_a2c95060a2d3fd5a6ab6fdddb2e44d3a2}{
virtual void {\bfseries error\_\-event} ()}
\label{classFinderTcpBase_a2c95060a2d3fd5a6ab6fdddb2e44d3a2}

\item 
\hypertarget{classFinderTcpBase_a9e09f6f71df7427dd90c2e2920e50db7}{
void {\bfseries close} ()}
\label{classFinderTcpBase_a9e09f6f71df7427dd90c2e2920e50db7}

\item 
\hypertarget{classFinderTcpBase_a060d73f157f579f1c6e38af5a30bc02a}{
bool {\bfseries closed} () const }
\label{classFinderTcpBase_a060d73f157f579f1c6e38af5a30bc02a}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classFinderTcpBase_ace8a01714bbb34ebb0c2923e78093646}{
void {\bfseries read\_\-callback} (AsyncFileOperator::Event, const uint8\_\-t $\ast$, size\_\-t, size\_\-t)}
\label{classFinderTcpBase_ace8a01714bbb34ebb0c2923e78093646}

\item 
\hypertarget{classFinderTcpBase_a0626b46370e7beed13b16c8732092598}{
void {\bfseries write\_\-callback} (AsyncFileOperator::Event, const uint8\_\-t $\ast$, size\_\-t, size\_\-t)}
\label{classFinderTcpBase_a0626b46370e7beed13b16c8732092598}

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

\item 
\hypertarget{classFinderTcpBase_af8faf4651f06cace740f4e4ae5272c7e}{
vector$<$ uint8\_\-t $>$ {\bfseries \_\-input\_\-buffer}}
\label{classFinderTcpBase_af8faf4651f06cace740f4e4ae5272c7e}

\item 
\hypertarget{classFinderTcpBase_a85fdb39392f41be1f951da712cf9bb9b}{
\hyperlink{classAsyncFileReader}{AsyncFileReader} {\bfseries \_\-reader}}
\label{classFinderTcpBase_a85fdb39392f41be1f951da712cf9bb9b}

\item 
\hypertarget{classFinderTcpBase_a0fa52c93d508974c706c1e53a9ee56eb}{
\hyperlink{classAsyncFileWriter}{AsyncFileWriter} {\bfseries \_\-writer}}
\label{classFinderTcpBase_a0fa52c93d508974c706c1e53a9ee56eb}

\item 
\hypertarget{classFinderTcpBase_a33119f1bc9e5f9c58d2da33a5ef3edee}{
uint32\_\-t {\bfseries \_\-isize}}
\label{classFinderTcpBase_a33119f1bc9e5f9c58d2da33a5ef3edee}

\item 
\hypertarget{classFinderTcpBase_aa56dd01b67e3996e05b74e2939f09acd}{
uint32\_\-t {\bfseries \_\-osize}}
\label{classFinderTcpBase_aa56dd01b67e3996e05b74e2939f09acd}

\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\hypertarget{classFinderTcpBase_a217f32614c3fa69978f47059fb6dc5bd}{
\index{FinderTcpBase@{FinderTcpBase}!read\_\-enabled@{read\_\-enabled}}
\index{read\_\-enabled@{read\_\-enabled}!FinderTcpBase@{FinderTcpBase}}
\subsubsection[{read\_\-enabled}]{\setlength{\rightskip}{0pt plus 5cm}bool FinderTcpBase::read\_\-enabled (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classFinderTcpBase_a217f32614c3fa69978f47059fb6dc5bd}


Determine whether read events can occur. 

\begin{DoxyReturn}{Returns}
true if read events are enabled. 
\end{DoxyReturn}
\hypertarget{classFinderTcpBase_a7e42a4051b4baacf148755bc8f2a28e5}{
\index{FinderTcpBase@{FinderTcpBase}!read\_\-event@{read\_\-event}}
\index{read\_\-event@{read\_\-event}!FinderTcpBase@{FinderTcpBase}}
\subsubsection[{read\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}virtual bool FinderTcpBase::read\_\-event (
\begin{DoxyParamCaption}
\item[{int}]{errval, }
\item[{const uint8\_\-t $\ast$}]{data, }
\item[{uint32\_\-t}]{data\_\-bytes}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classFinderTcpBase_a7e42a4051b4baacf148755bc8f2a28e5}


Method to be implemented by derived classes that is called when data arrives or an error occurs when processing when data arrives. 


\begin{DoxyParams}{Parameters}
{\em errval} & error code, values are equivalent to errno. \\
\hline
{\em data} & pointer to data \\
\hline
{\em data\_\-bytes} & size of data. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} data was processed without an error and \hyperlink{protocolthe-p}{the} connection was kept, otherwise false. 
\end{DoxyReturn}


Implemented in \hyperlink{classFinderTcpMessenger_a6fc365ecacbb88ee60a81e01ca3605f0}{FinderTcpMessenger}, and \hyperlink{classDummyFinderTcp_a3aa73b68a10cd018c0c32a49f440b96d}{DummyFinderTcp}.

\hypertarget{classFinderTcpBase_a7b8f035331884f365153140d6d23fc27}{
\index{FinderTcpBase@{FinderTcpBase}!set\_\-read\_\-enabled@{set\_\-read\_\-enabled}}
\index{set\_\-read\_\-enabled@{set\_\-read\_\-enabled}!FinderTcpBase@{FinderTcpBase}}
\subsubsection[{set\_\-read\_\-enabled}]{\setlength{\rightskip}{0pt plus 5cm}void FinderTcpBase::set\_\-read\_\-enabled (
\begin{DoxyParamCaption}
\item[{bool}]{en}
\end{DoxyParamCaption}
)}}
\label{classFinderTcpBase_a7b8f035331884f365153140d6d23fc27}


Control whether read events can occur. 


\begin{DoxyParams}{Parameters}
{\em en} & boolean value with true corresponding to read enabled. \\
\hline
\end{DoxyParams}
\hypertarget{classFinderTcpBase_ad73a88fb000b1716100253ea338a8ce4}{
\index{FinderTcpBase@{FinderTcpBase}!write\_\-data@{write\_\-data}}
\index{write\_\-data@{write\_\-data}!FinderTcpBase@{FinderTcpBase}}
\subsubsection[{write\_\-data}]{\setlength{\rightskip}{0pt plus 5cm}bool FinderTcpBase::write\_\-data (
\begin{DoxyParamCaption}
\item[{const uint8\_\-t $\ast$}]{data, }
\item[{uint32\_\-t}]{data\_\-bytes}
\end{DoxyParamCaption}
)}}
\label{classFinderTcpBase_ad73a88fb000b1716100253ea338a8ce4}


Write data on TCP connection. 

To avoid an unnecessary data copy, \hyperlink{protocolthe-p}{the} client is expected to ensure \hyperlink{protocolthe-p}{the} data is valid until departure\_\-event is called with \hyperlink{protocolthe-p}{the} corresponding data pointer.


\begin{DoxyParams}{Parameters}
{\em data} & pointer to data. \\
\hline
{\em data\_\-bytes} & size data pointed to in bytes.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if data accepted for writing, false if no buffer space is available at this time. 
\end{DoxyReturn}
\hypertarget{classFinderTcpBase_ac7f3903fd6ade715f647038ed12abce8}{
\index{FinderTcpBase@{FinderTcpBase}!write\_\-event@{write\_\-event}}
\index{write\_\-event@{write\_\-event}!FinderTcpBase@{FinderTcpBase}}
\subsubsection[{write\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}virtual void FinderTcpBase::write\_\-event (
\begin{DoxyParamCaption}
\item[{int}]{errval, }
\item[{const uint8\_\-t $\ast$}]{data, }
\item[{uint32\_\-t}]{data\_\-bytes}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classFinderTcpBase_ac7f3903fd6ade715f647038ed12abce8}


Method to be implemented by derived classes that is called when data writing completes or an error occurs when processing when write. 


\begin{DoxyParams}{Parameters}
{\em errval} & error code, values are equivalent to errno. \\
\hline
\end{DoxyParams}


Implemented in \hyperlink{classFinderTcpMessenger_a2b8f314c0f343dac6da5195a5033a475}{FinderTcpMessenger}, and \hyperlink{classDummyFinderTcp_a3775134c6d3a0c7d6f4088025e1bdd29}{DummyFinderTcp}.



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