\hypertarget{classIoTcpUdpReceiver}{
\section{IoTcpUdpReceiver Class Reference}
\label{classIoTcpUdpReceiver}\index{IoTcpUdpReceiver@{IoTcpUdpReceiver}}
}


A base class for I/O TCP/UDP data receiver.  




{\ttfamily \#include $<$io\_\-tcpudp.hh$>$}

Inheritance diagram for IoTcpUdpReceiver:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classIoTcpUdpReceiver}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIoTcpUdpReceiver_a128a72809715ee4390a82269c4c8ea7a}{
\hyperlink{classIoTcpUdpReceiver_a128a72809715ee4390a82269c4c8ea7a}{IoTcpUdpReceiver} ()}
\label{classIoTcpUdpReceiver_a128a72809715ee4390a82269c4c8ea7a}

\begin{DoxyCompactList}\small\item\em Default constructor. \item\end{DoxyCompactList}\item 
\hypertarget{classIoTcpUdpReceiver_a6f057d738f064fc98020e529dbd8db1e}{
virtual \hyperlink{classIoTcpUdpReceiver_a6f057d738f064fc98020e529dbd8db1e}{$\sim$IoTcpUdpReceiver} ()}
\label{classIoTcpUdpReceiver_a6f057d738f064fc98020e529dbd8db1e}

\begin{DoxyCompactList}\small\item\em Virtual destructor. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{classIoTcpUdpReceiver_aa4b6bc9b606b87a08925e80b10b139f0}{recv\_\-event} (const string \&if\_\-name, const string \&vif\_\-name, const \hyperlink{classIPvX}{IPvX} \&src\_\-host, uint16\_\-t src\_\-port, const vector$<$ uint8\_\-t $>$ \&data)=0
\begin{DoxyCompactList}\small\item\em Data received event. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{classIoTcpUdpReceiver_aedc005a2fa5021c690f776c2f3adec84}{inbound\_\-connect\_\-event} (const \hyperlink{classIPvX}{IPvX} \&src\_\-host, uint16\_\-t src\_\-port, \hyperlink{classIoTcpUdp}{IoTcpUdp} $\ast$Xnew\_\-io\_\-tcpudp)=0
\begin{DoxyCompactList}\small\item\em Inbound connection request received event. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{classIoTcpUdpReceiver_a1b128378f03e4ed5a0b9ec5a97c14e44}{outgoing\_\-connect\_\-event} ()=0
\begin{DoxyCompactList}\small\item\em Outgoing connection request completed event. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{classIoTcpUdpReceiver_a5f5107217483aa0f979183872d828ebc}{error\_\-event} (const string \&error, bool fatal)=0
\begin{DoxyCompactList}\small\item\em Error occured event. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{classIoTcpUdpReceiver_ac58b2096de49650a0f7fb974b88d448d}{disconnect\_\-event} ()=0
\begin{DoxyCompactList}\small\item\em Connection closed by peer event. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A base class for I/O TCP/UDP data receiver. The real receiver must inherit from this class and register with \hyperlink{protocolthe-p}{the} corresponding \hyperlink{classIoTcpUdp}{IoTcpUdp} entity to receive \hyperlink{protocolthe-p}{the} TCP/UDP data and data-\/related events. \begin{DoxySeeAlso}{See also}
\hyperlink{classIoTcpUdp}{IoTcpUdp}. 
\end{DoxySeeAlso}


\subsection{Member Function Documentation}
\hypertarget{classIoTcpUdpReceiver_ac58b2096de49650a0f7fb974b88d448d}{
\index{IoTcpUdpReceiver@{IoTcpUdpReceiver}!disconnect\_\-event@{disconnect\_\-event}}
\index{disconnect\_\-event@{disconnect\_\-event}!IoTcpUdpReceiver@{IoTcpUdpReceiver}}
\subsubsection[{disconnect\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}virtual void IoTcpUdpReceiver::disconnect\_\-event (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoTcpUdpReceiver_ac58b2096de49650a0f7fb974b88d448d}


Connection closed by peer event. 

It applies only to TCP sockets. This method is not called if \hyperlink{protocolthe-p}{the} socket is gracefully closed through close(). 

Implemented in \hyperlink{classIoTcpUdpComm_a6e4841d82846582d4fd5cd4d41b3220f}{IoTcpUdpComm}.

\hypertarget{classIoTcpUdpReceiver_a5f5107217483aa0f979183872d828ebc}{
\index{IoTcpUdpReceiver@{IoTcpUdpReceiver}!error\_\-event@{error\_\-event}}
\index{error\_\-event@{error\_\-event}!IoTcpUdpReceiver@{IoTcpUdpReceiver}}
\subsubsection[{error\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}virtual void IoTcpUdpReceiver::error\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{error, }
\item[{bool}]{fatal}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoTcpUdpReceiver_a5f5107217483aa0f979183872d828ebc}


Error occured event. 


\begin{DoxyParams}{Parameters}
{\em error} & a textual description of \hyperlink{protocolthe-p}{the} error. \\
\hline
{\em fatal} & indication of whether socket is shutdown because of error. \\
\hline
\end{DoxyParams}


Implemented in \hyperlink{classIoTcpUdpComm_ad92362e78e7487ef1a4f9c43229738bd}{IoTcpUdpComm}.

\hypertarget{classIoTcpUdpReceiver_aedc005a2fa5021c690f776c2f3adec84}{
\index{IoTcpUdpReceiver@{IoTcpUdpReceiver}!inbound\_\-connect\_\-event@{inbound\_\-connect\_\-event}}
\index{inbound\_\-connect\_\-event@{inbound\_\-connect\_\-event}!IoTcpUdpReceiver@{IoTcpUdpReceiver}}
\subsubsection[{inbound\_\-connect\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}virtual void IoTcpUdpReceiver::inbound\_\-connect\_\-event (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{src\_\-host, }
\item[{uint16\_\-t}]{src\_\-port, }
\item[{{\bf IoTcpUdp} $\ast$}]{Xnew\_\-io\_\-tcpudp}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoTcpUdpReceiver_aedc005a2fa5021c690f776c2f3adec84}


Inbound connection request received event. 

It applies only to TCP sockets.


\begin{DoxyParams}{Parameters}
{\em src\_\-host} & \hyperlink{protocolthe-p}{the} originating host IP address. \\
\hline
{\em src\_\-port} & \hyperlink{protocolthe-p}{the} originating host port number. \\
\hline
{\em new\_\-io\_\-tcpudp} & \hyperlink{protocolthe-p}{the} handler for \hyperlink{protocolthe-p}{the} new connection. \\
\hline
\end{DoxyParams}


Implemented in \hyperlink{classIoTcpUdpComm_a134a7bbd183061806f306e883e4689b5}{IoTcpUdpComm}.

\hypertarget{classIoTcpUdpReceiver_a1b128378f03e4ed5a0b9ec5a97c14e44}{
\index{IoTcpUdpReceiver@{IoTcpUdpReceiver}!outgoing\_\-connect\_\-event@{outgoing\_\-connect\_\-event}}
\index{outgoing\_\-connect\_\-event@{outgoing\_\-connect\_\-event}!IoTcpUdpReceiver@{IoTcpUdpReceiver}}
\subsubsection[{outgoing\_\-connect\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}virtual void IoTcpUdpReceiver::outgoing\_\-connect\_\-event (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoTcpUdpReceiver_a1b128378f03e4ed5a0b9ec5a97c14e44}


Outgoing connection request completed event. 

It applies only to TCP sockets. 

Implemented in \hyperlink{classIoTcpUdpComm_a28cfe54607722b0e4a81f2d72b638249}{IoTcpUdpComm}.

\hypertarget{classIoTcpUdpReceiver_aa4b6bc9b606b87a08925e80b10b139f0}{
\index{IoTcpUdpReceiver@{IoTcpUdpReceiver}!recv\_\-event@{recv\_\-event}}
\index{recv\_\-event@{recv\_\-event}!IoTcpUdpReceiver@{IoTcpUdpReceiver}}
\subsubsection[{recv\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}virtual void IoTcpUdpReceiver::recv\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{const {\bf IPvX} \&}]{src\_\-host, }
\item[{uint16\_\-t}]{src\_\-port, }
\item[{const vector$<$ uint8\_\-t $>$ \&}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoTcpUdpReceiver_aa4b6bc9b606b87a08925e80b10b139f0}


Data received event. 


\begin{DoxyParams}{Parameters}
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} interface name \hyperlink{protocolthe-p}{the} packet arrived on, if known. If unknown, then it is an empty string. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} vif name \hyperlink{protocolthe-p}{the} packet arrived on, if known. If unknown, then it is an empty string. \\
\hline
{\em src\_\-host} & \hyperlink{protocolthe-p}{the} originating host IP address. \\
\hline
{\em src\_\-port} & \hyperlink{protocolthe-p}{the} originating host port number. \\
\hline
{\em data} & \hyperlink{protocolthe-p}{the} data received. \\
\hline
\end{DoxyParams}


Implemented in \hyperlink{classIoTcpUdpComm_a8fc255e5658e0eaa7e750b4769012cfd}{IoTcpUdpComm}.



The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/fea/io\_\-tcpudp.hh\end{DoxyCompactItemize}
