\hypertarget{classTestSocket4TCP}{
\section{TestSocket4TCP Class Reference}
\label{classTestSocket4TCP}\index{TestSocket4TCP@{TestSocket4TCP}}
}
Inheritance diagram for TestSocket4TCP:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classTestSocket4TCP}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestSocket4TCP_acb49e116bfed7b2eea35b2e4a0e8cda5}{
{\bfseries TestSocket4TCP} (\hyperlink{classEventLoop}{EventLoop} \&e, const string \&fea\_\-target\_\-name, \hyperlink{classIPv4}{IPv4} finder\_\-host, uint16\_\-t finder\_\-port)}
\label{classTestSocket4TCP_acb49e116bfed7b2eea35b2e4a0e8cda5}

\item 
\hypertarget{classTestSocket4TCP_a66e0a9903598627c6f46b71f493ed002}{
uint32\_\-t {\bfseries bytes\_\-received} () const }
\label{classTestSocket4TCP_a66e0a9903598627c6f46b71f493ed002}

\item 
\hypertarget{classTestSocket4TCP_a5e3d403a7183729fd25df8d54baf9762}{
uint32\_\-t {\bfseries bytes\_\-sent} () const }
\label{classTestSocket4TCP_a5e3d403a7183729fd25df8d54baf9762}

\item 
\hypertarget{classTestSocket4TCP_a03e636389177f22f2e16fb2e1739344e}{
uint32\_\-t {\bfseries packets\_\-received} () const }
\label{classTestSocket4TCP_a03e636389177f22f2e16fb2e1739344e}

\item 
\hypertarget{classTestSocket4TCP_abfecfda4361e1a49ee3c747a56b7811a}{
uint32\_\-t {\bfseries packets\_\-sent} () const }
\label{classTestSocket4TCP_abfecfda4361e1a49ee3c747a56b7811a}

\item 
\hypertarget{classTestSocket4TCP_ae025ec7f4af008b80295bbf4e4c97dfd}{
uint32\_\-t {\bfseries xrl\_\-errors} () const }
\label{classTestSocket4TCP_ae025ec7f4af008b80295bbf4e4c97dfd}

\item 
\hypertarget{classTestSocket4TCP_a66815b9d19be42475a1dd559f3fa4a20}{
void \hyperlink{classTestSocket4TCP_a66815b9d19be42475a1dd559f3fa4a20}{stop\_\-sending} ()}
\label{classTestSocket4TCP_a66815b9d19be42475a1dd559f3fa4a20}

\begin{DoxyCompactList}\small\item\em Stop sending packets. \item\end{DoxyCompactList}\item 
bool \hyperlink{classTestSocket4TCP_a305ca089a2d858b34a78e1bb1036f280}{send\_\-data} (string \&sockid, uint32\_\-t bytes)
\begin{DoxyCompactList}\small\item\em \hyperlink{structSend}{Send} \hyperlink{protocolthe-p}{the} specified number of bytes of data through \hyperlink{protocolthe-p}{the} given socket. \item\end{DoxyCompactList}\item 
\hypertarget{classTestSocket4TCP_ac8f323ab933875870971a561ab0d93df}{
virtual void {\bfseries start\_\-sending} (uint32\_\-t bytes, uint32\_\-t ipg\_\-ms)=0}
\label{classTestSocket4TCP_ac8f323ab933875870971a561ab0d93df}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestSocket4TCP_acce9bf9fe356d1d2ec6a2a8857f3be05}{
virtual bool {\bfseries send\_\-data} (uint32\_\-t bytes)=0}
\label{classTestSocket4TCP_acce9bf9fe356d1d2ec6a2a8857f3be05}

\item 
\hypertarget{classTestSocket4TCP_ab30ec949436ab1e6ae35935745e13dd4}{
virtual void {\bfseries send\_\-data\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e)=0}
\label{classTestSocket4TCP_ab30ec949436ab1e6ae35935745e13dd4}

\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4TCP_aa8f36ba6865f0a55f5e6010f6cb7856d}{common\_\-0\_\-1\_\-get\_\-target\_\-name} (string \&name)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4TCP_a915a5adba65e94c860aa005f99618b46}{common\_\-0\_\-1\_\-get\_\-version} (string \&version)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4TCP_a5d2124c017a0ef853cb7ef52a02f07e8}{common\_\-0\_\-1\_\-get\_\-status} (uint32\_\-t \&status, string \&reason)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4TCP_a7e39d7e0b2b508cd4aabcee19f6906e9}{common\_\-0\_\-1\_\-shutdown} ()
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4TCP_a845bc535792885ac183e4c1d60266955}{socket4\_\-user\_\-0\_\-1\_\-recv\_\-event} (const string \&sockid, const string \&if\_\-name, const string \&vif\_\-name, const \hyperlink{classIPv4}{IPv4} \&src\_\-host, const uint32\_\-t \&src\_\-port, const vector$<$ uint8\_\-t $>$ \&data)=0
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4TCP_a3fa2fe3daf7b750380d6a5d686e5a2e8}{socket4\_\-user\_\-0\_\-1\_\-inbound\_\-connect\_\-event} (const string \&sockid, const \hyperlink{classIPv4}{IPv4} \&src\_\-host, const uint32\_\-t \&src\_\-port, const string \&new\_\-sockid, bool \&accept)=0
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4TCP_ac6799d268b1dbbfd3712711ebfc6254c}{socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event} (const string \&sockid)=0
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4TCP_a6a2c0add6108cadc2a777659c137a817}{socket4\_\-user\_\-0\_\-1\_\-error\_\-event} (const string \&sockid, const string \&error, const bool \&fatal)=0
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4TCP_a2c70f2d9e84bec869130f9f9433a400d}{socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event} (const string \&sockid)=0
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestSocket4TCP_aa904ee4f6c85fbc0d9356dbd1ecf62d9}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-e}}
\label{classTestSocket4TCP_aa904ee4f6c85fbc0d9356dbd1ecf62d9}

\item 
\hypertarget{classTestSocket4TCP_a032b8567e8240d26f7da20c635e22d4a}{
\hyperlink{classXrlRouter}{XrlRouter} $\ast$ {\bfseries \_\-r}}
\label{classTestSocket4TCP_a032b8567e8240d26f7da20c635e22d4a}

\item 
\hypertarget{classTestSocket4TCP_ae1757681a067f55247567012cac9633a}{
string {\bfseries \_\-fea\_\-target\_\-name}}
\label{classTestSocket4TCP_ae1757681a067f55247567012cac9633a}

\item 
\hypertarget{classTestSocket4TCP_a14db6e5940058b03c78c67ffe407aa9b}{
uint32\_\-t {\bfseries \_\-p\_\-snd}}
\label{classTestSocket4TCP_a14db6e5940058b03c78c67ffe407aa9b}

\item 
\hypertarget{classTestSocket4TCP_a9e6c488561f47e1526e6782434eba54d}{
uint32\_\-t {\bfseries \_\-p\_\-rcv}}
\label{classTestSocket4TCP_a9e6c488561f47e1526e6782434eba54d}

\item 
\hypertarget{classTestSocket4TCP_abc2049606a9f1b2ba6e99fcb67d0cfca}{
uint32\_\-t {\bfseries \_\-b\_\-snd}}
\label{classTestSocket4TCP_abc2049606a9f1b2ba6e99fcb67d0cfca}

\item 
\hypertarget{classTestSocket4TCP_a85380d1a00156cdcfa03d702c0d195e8}{
uint32\_\-t {\bfseries \_\-b\_\-rcv}}
\label{classTestSocket4TCP_a85380d1a00156cdcfa03d702c0d195e8}

\item 
\hypertarget{classTestSocket4TCP_af29bb690988b6e0d9c09fe22d598540b}{
uint32\_\-t {\bfseries \_\-x\_\-err}}
\label{classTestSocket4TCP_af29bb690988b6e0d9c09fe22d598540b}

\item 
\hypertarget{classTestSocket4TCP_a7af34a076db2ea2331c61b9f265aed26}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-t\_\-snd}}
\label{classTestSocket4TCP_a7af34a076db2ea2331c61b9f265aed26}

\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\hypertarget{classTestSocket4TCP_a5d2124c017a0ef853cb7ef52a02f07e8}{
\index{TestSocket4TCP@{TestSocket4TCP}!common\_\-0\_\-1\_\-get\_\-status@{common\_\-0\_\-1\_\-get\_\-status}}
\index{common\_\-0\_\-1\_\-get\_\-status@{common\_\-0\_\-1\_\-get\_\-status}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{common\_\-0\_\-1\_\-get\_\-status}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4TCP::common\_\-0\_\-1\_\-get\_\-status (
\begin{DoxyParamCaption}
\item[{uint32\_\-t \&}]{status, }
\item[{string \&}]{reason}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestSocket4TCP_a5d2124c017a0ef853cb7ef52a02f07e8}


Pure-\/virtual function that needs to be implemented to: 

Get status of \hyperlink{classXrl}{Xrl} Target 

Implements \hyperlink{structXrlTestSocket4TargetBase_a49730bf75596f497761844a2a5bfd661}{XrlTestSocket4TargetBase}.

\hypertarget{classTestSocket4TCP_aa8f36ba6865f0a55f5e6010f6cb7856d}{
\index{TestSocket4TCP@{TestSocket4TCP}!common\_\-0\_\-1\_\-get\_\-target\_\-name@{common\_\-0\_\-1\_\-get\_\-target\_\-name}}
\index{common\_\-0\_\-1\_\-get\_\-target\_\-name@{common\_\-0\_\-1\_\-get\_\-target\_\-name}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{common\_\-0\_\-1\_\-get\_\-target\_\-name}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4TCP::common\_\-0\_\-1\_\-get\_\-target\_\-name (
\begin{DoxyParamCaption}
\item[{string \&}]{name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestSocket4TCP_aa8f36ba6865f0a55f5e6010f6cb7856d}


Pure-\/virtual function that needs to be implemented to: 

Get name of \hyperlink{classXrl}{Xrl} Target 

Implements \hyperlink{structXrlTestSocket4TargetBase_a73c2343371fa50e874a35529c668a186}{XrlTestSocket4TargetBase}.

\hypertarget{classTestSocket4TCP_a915a5adba65e94c860aa005f99618b46}{
\index{TestSocket4TCP@{TestSocket4TCP}!common\_\-0\_\-1\_\-get\_\-version@{common\_\-0\_\-1\_\-get\_\-version}}
\index{common\_\-0\_\-1\_\-get\_\-version@{common\_\-0\_\-1\_\-get\_\-version}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{common\_\-0\_\-1\_\-get\_\-version}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4TCP::common\_\-0\_\-1\_\-get\_\-version (
\begin{DoxyParamCaption}
\item[{string \&}]{version}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestSocket4TCP_a915a5adba65e94c860aa005f99618b46}


Pure-\/virtual function that needs to be implemented to: 

Get version string from \hyperlink{classXrl}{Xrl} Target 

Implements \hyperlink{structXrlTestSocket4TargetBase_ac07267901abc9584b0face95bffc4ecf}{XrlTestSocket4TargetBase}.

\hypertarget{classTestSocket4TCP_a7e39d7e0b2b508cd4aabcee19f6906e9}{
\index{TestSocket4TCP@{TestSocket4TCP}!common\_\-0\_\-1\_\-shutdown@{common\_\-0\_\-1\_\-shutdown}}
\index{common\_\-0\_\-1\_\-shutdown@{common\_\-0\_\-1\_\-shutdown}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{common\_\-0\_\-1\_\-shutdown}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4TCP::common\_\-0\_\-1\_\-shutdown (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestSocket4TCP_a7e39d7e0b2b508cd4aabcee19f6906e9}


Pure-\/virtual function that needs to be implemented to: 

Request clean shutdown of \hyperlink{classXrl}{Xrl} Target 

Implements \hyperlink{structXrlTestSocket4TargetBase_abcd0b1021f89c9f6c8dd6518d2039204}{XrlTestSocket4TargetBase}.

\hypertarget{classTestSocket4TCP_a305ca089a2d858b34a78e1bb1036f280}{
\index{TestSocket4TCP@{TestSocket4TCP}!send\_\-data@{send\_\-data}}
\index{send\_\-data@{send\_\-data}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{send\_\-data}]{\setlength{\rightskip}{0pt plus 5cm}bool TestSocket4TCP::send\_\-data (
\begin{DoxyParamCaption}
\item[{string \&}]{sockid, }
\item[{uint32\_\-t}]{bytes}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTestSocket4TCP_a305ca089a2d858b34a78e1bb1036f280}


\hyperlink{structSend}{Send} \hyperlink{protocolthe-p}{the} specified number of bytes of data through \hyperlink{protocolthe-p}{the} given socket. 

On success, \hyperlink{protocolthe-p}{the} number of sent bytes and packets is bumped up accordingly, and true is returned. On failure \hyperlink{protocolthe-p}{the} number of xrl errors is bumped by one, and \hyperlink{protocolthe-p}{the} sending timer stopped. \hypertarget{classTestSocket4TCP_a2c70f2d9e84bec869130f9f9433a400d}{
\index{TestSocket4TCP@{TestSocket4TCP}!socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event@{socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event}}
\index{socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event@{socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4TCP::socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{sockid}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, pure virtual\mbox{]}}}}
\label{classTestSocket4TCP_a2c70f2d9e84bec869130f9f9433a400d}


Pure-\/virtual function that needs to be implemented to: 

Method invoked by target implementing socket4/0.1 when \hyperlink{protocolthe-p}{the} peer has closed \hyperlink{protocolthe-p}{the} connection. It applies only to TCP sockets. Note that \hyperlink{protocolthe-p}{the} socket itself is left open and must be explicitly closed.


\begin{DoxyParams}{Parameters}
{\em sockid} & \hyperlink{protocolthe-p}{the} identifier associated with socket where \hyperlink{protocolthe-p}{the} event occurred. \\
\hline
\end{DoxyParams}


Implements \hyperlink{structXrlTestSocket4TargetBase_a346f7e69fcf53708474856d2d12e9298}{XrlTestSocket4TargetBase}.



Implemented in \hyperlink{classTestSocket4TCPServer_a467a7be495eff7b53fa0ecec28b02da2}{TestSocket4TCPServer}, and \hyperlink{classTestSocket4TCPClient_ae41f53b4adf76bc3c089aaa6374d5e9a}{TestSocket4TCPClient}.

\hypertarget{classTestSocket4TCP_a6a2c0add6108cadc2a777659c137a817}{
\index{TestSocket4TCP@{TestSocket4TCP}!socket4\_\-user\_\-0\_\-1\_\-error\_\-event@{socket4\_\-user\_\-0\_\-1\_\-error\_\-event}}
\index{socket4\_\-user\_\-0\_\-1\_\-error\_\-event@{socket4\_\-user\_\-0\_\-1\_\-error\_\-event}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-error\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4TCP::socket4\_\-user\_\-0\_\-1\_\-error\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{sockid, }
\item[{const string \&}]{error, }
\item[{const bool \&}]{fatal}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, pure virtual\mbox{]}}}}
\label{classTestSocket4TCP_a6a2c0add6108cadc2a777659c137a817}


Pure-\/virtual function that needs to be implemented to: 

Method invoked by target implementing socket4/0.1 when an error occurs.


\begin{DoxyParams}{Parameters}
{\em sockid} & \hyperlink{protocolthe-p}{the} identifier associated with socket where \hyperlink{protocolthe-p}{the} event occurred.\\
\hline
{\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}


Implements \hyperlink{structXrlTestSocket4TargetBase_a20ac53c6d156aef646b6cdfb0c089c0d}{XrlTestSocket4TargetBase}.



Implemented in \hyperlink{classTestSocket4TCPServer_ad7c562b410b0e6f1fedf861568195673}{TestSocket4TCPServer}, and \hyperlink{classTestSocket4TCPClient_a2b5bef7cbbc421d5df2be3b4ea7e9224}{TestSocket4TCPClient}.

\hypertarget{classTestSocket4TCP_a3fa2fe3daf7b750380d6a5d686e5a2e8}{
\index{TestSocket4TCP@{TestSocket4TCP}!socket4\_\-user\_\-0\_\-1\_\-inbound\_\-connect\_\-event@{socket4\_\-user\_\-0\_\-1\_\-inbound\_\-connect\_\-event}}
\index{socket4\_\-user\_\-0\_\-1\_\-inbound\_\-connect\_\-event@{socket4\_\-user\_\-0\_\-1\_\-inbound\_\-connect\_\-event}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-inbound\_\-connect\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4TCP::socket4\_\-user\_\-0\_\-1\_\-inbound\_\-connect\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{sockid, }
\item[{const {\bf IPv4} \&}]{src\_\-host, }
\item[{const uint32\_\-t \&}]{src\_\-port, }
\item[{const string \&}]{new\_\-sockid, }
\item[{bool \&}]{accept}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, pure virtual\mbox{]}}}}
\label{classTestSocket4TCP_a3fa2fe3daf7b750380d6a5d686e5a2e8}


Pure-\/virtual function that needs to be implemented to: 

Method invoked by target implementing socket4/0.1 when a connection request is received from an \hyperlink{classIPv4}{IPv4} source. It applies only to TCP sockets.


\begin{DoxyParams}{Parameters}
{\em sockid} & \hyperlink{protocolthe-p}{the} identifier associated with socket where \hyperlink{protocolthe-p}{the} event occurred.\\
\hline
{\em src\_\-host} & \hyperlink{protocolthe-p}{the} connecting host.\\
\hline
{\em src\_\-port} & \hyperlink{protocolthe-p}{the} connecting IP port.\\
\hline
{\em new\_\-sockid} & \hyperlink{protocolthe-p}{the} identifier associated with \hyperlink{protocolthe-p}{the} new socket that has been created to handle \hyperlink{protocolthe-p}{the} new connection.\\
\hline
{\em accept} & if true, \hyperlink{protocolthe-p}{the} connection request has been accepted, otherwise it has been rejected. \\
\hline
\end{DoxyParams}


Implements \hyperlink{structXrlTestSocket4TargetBase_ab5b0797f474fc208c55db83210b0c714}{XrlTestSocket4TargetBase}.



Implemented in \hyperlink{classTestSocket4TCPServer_a9074a0fe1b0c3f6485f2974595fea26d}{TestSocket4TCPServer}, and \hyperlink{classTestSocket4TCPClient_ad342fca78cb53e4186269b3f63e11595}{TestSocket4TCPClient}.

\hypertarget{classTestSocket4TCP_ac6799d268b1dbbfd3712711ebfc6254c}{
\index{TestSocket4TCP@{TestSocket4TCP}!socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event@{socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event}}
\index{socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event@{socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4TCP::socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{sockid}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, pure virtual\mbox{]}}}}
\label{classTestSocket4TCP_ac6799d268b1dbbfd3712711ebfc6254c}


Pure-\/virtual function that needs to be implemented to: 

Method invoked by target implementing socket4/0.1 when an outgoing connection request originated by \hyperlink{protocolthe-p}{the} local host is completed. It applies only to TCP sockets. Note that if \hyperlink{protocolthe-p}{the} connection failed, \hyperlink{protocolthe-p}{the} error\_\-event will be dispatched instead.


\begin{DoxyParams}{Parameters}
{\em sockid} & \hyperlink{protocolthe-p}{the} identifier associated with socket where \hyperlink{protocolthe-p}{the} event occurred. \\
\hline
\end{DoxyParams}


Implements \hyperlink{structXrlTestSocket4TargetBase_a1b39f87a28a0ccff40facbe51f85d6c6}{XrlTestSocket4TargetBase}.



Implemented in \hyperlink{classTestSocket4TCPServer_a796bf38fe34f19b5d6dd9d8375428bd6}{TestSocket4TCPServer}, and \hyperlink{classTestSocket4TCPClient_a665fa3ba46b63bfe4ef16a921ba58af8}{TestSocket4TCPClient}.

\hypertarget{classTestSocket4TCP_a845bc535792885ac183e4c1d60266955}{
\index{TestSocket4TCP@{TestSocket4TCP}!socket4\_\-user\_\-0\_\-1\_\-recv\_\-event@{socket4\_\-user\_\-0\_\-1\_\-recv\_\-event}}
\index{socket4\_\-user\_\-0\_\-1\_\-recv\_\-event@{socket4\_\-user\_\-0\_\-1\_\-recv\_\-event}!TestSocket4TCP@{TestSocket4TCP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-recv\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4TCP::socket4\_\-user\_\-0\_\-1\_\-recv\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{sockid, }
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{const {\bf IPv4} \&}]{src\_\-host, }
\item[{const uint32\_\-t \&}]{src\_\-port, }
\item[{const vector$<$ uint8\_\-t $>$ \&}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, pure virtual\mbox{]}}}}
\label{classTestSocket4TCP_a845bc535792885ac183e4c1d60266955}


Pure-\/virtual function that needs to be implemented to: 

Method invoked by target implementing socket4/0.1 when a packet arrives from an \hyperlink{classIPv4}{IPv4} source.


\begin{DoxyParams}{Parameters}
{\em sockid} & \hyperlink{protocolthe-p}{the} identifier associated with socket where \hyperlink{protocolthe-p}{the} event occurred.\\
\hline
{\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.\\
\hline
{\em src\_\-port} & \hyperlink{protocolthe-p}{the} originating IP port.\\
\hline
{\em data} & \hyperlink{protocolthe-p}{the} data received. \\
\hline
\end{DoxyParams}


Implements \hyperlink{structXrlTestSocket4TargetBase_ad1da4f7da9c84b04fccd6d75c74c2374}{XrlTestSocket4TargetBase}.



Implemented in \hyperlink{classTestSocket4TCPServer_a3a15aead7ab951b493158d689f4b0b32}{TestSocket4TCPServer}, and \hyperlink{classTestSocket4TCPClient_a291e191fa0ef4c836894eb20b1c232d2}{TestSocket4TCPClient}.



The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/fea/tests/test\_\-xrl\_\-sockets4\_\-tcp.cc\end{DoxyCompactItemize}
