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

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

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

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

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

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

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

\item 
bool \hyperlink{classTestSocket4UDP_a257869c2a66fb4ff84b9592b8066b417}{bind} (\hyperlink{classIPv4}{IPv4} addr, uint16\_\-t port)
\begin{DoxyCompactList}\small\item\em Bind to interface and port. \item\end{DoxyCompactList}\item 
bool \hyperlink{classTestSocket4UDP_a57581e72434ebb51a9a58aa0feb17dfd}{close} ()
\begin{DoxyCompactList}\small\item\em Request closure of socket. \item\end{DoxyCompactList}\item 
void \hyperlink{classTestSocket4UDP_ac0caf88a25b16e30e3a26110849e7b74}{start\_\-sending} (\hyperlink{classIPv4}{IPv4} host, uint16\_\-t port, uint32\_\-t bytes, uint32\_\-t ipg\_\-ms)
\begin{DoxyCompactList}\small\item\em Start sending packets. \item\end{DoxyCompactList}\item 
\hypertarget{classTestSocket4UDP_adda122f95fd4b648b7df469a8c1ca185}{
void \hyperlink{classTestSocket4UDP_adda122f95fd4b648b7df469a8c1ca185}{stop\_\-sending} ()}
\label{classTestSocket4UDP_adda122f95fd4b648b7df469a8c1ca185}

\begin{DoxyCompactList}\small\item\em Stop sending packets. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestSocket4UDP_a588e30bcfd817e1593a67a03aff161e9}{
bool {\bfseries send\_\-data} (\hyperlink{classIPv4}{IPv4} host, uint16\_\-t port, uint32\_\-t bytes)}
\label{classTestSocket4UDP_a588e30bcfd817e1593a67a03aff161e9}

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

\item 
\hypertarget{classTestSocket4UDP_aaeb5c15672735d53d39feaca4f7acd95}{
void {\bfseries bind\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e, const string $\ast$psockid)}
\label{classTestSocket4UDP_aaeb5c15672735d53d39feaca4f7acd95}

\item 
\hypertarget{classTestSocket4UDP_a0c97995455fda4a40a1abca6a058d743}{
void {\bfseries close\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e)}
\label{classTestSocket4UDP_a0c97995455fda4a40a1abca6a058d743}

\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4UDP_af8960d1efceef153c81c718d89600486}{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{classTestSocket4UDP_adddc92fcefdbb80f687cdc1c2d133162}{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{classTestSocket4UDP_a3f914899a4a0ca1e76c79e8d636f90a6}{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{classTestSocket4UDP_aa3cd57c016942afdfcdeca07056182d4}{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{classTestSocket4UDP_a8ca393824b4ccd4028a5149bbdf2fec3}{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)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4UDP_a63690fd967a7919ce8ab090bc573759c}{socket4\_\-user\_\-0\_\-1\_\-inbound\_\-connect\_\-event} (const string \&, const \hyperlink{classIPv4}{IPv4} \&, const uint32\_\-t \&, const string \&, bool \&)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4UDP_ac8e94299f7ab60bbc14cc0f4e2b3d10e}{socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event} (const string \&)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4UDP_a6a5c755e6a2a41a29f47f28fa2e08a37}{socket4\_\-user\_\-0\_\-1\_\-error\_\-event} (const string \&sockid, const string \&error, const bool \&fatal)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestSocket4UDP_a841c6765d510278a54a04a7b5bdf32dc}{socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event} (const string \&sockid)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestSocket4UDP_ab50a6f0de9f0261d38473c9dd840449b}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-e}}
\label{classTestSocket4UDP_ab50a6f0de9f0261d38473c9dd840449b}

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

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

\item 
\hypertarget{classTestSocket4UDP_ab55213631e08acfce9f94ef748a4c77e}{
string {\bfseries \_\-sockid}}
\label{classTestSocket4UDP_ab55213631e08acfce9f94ef748a4c77e}

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

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

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

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

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

\item 
\hypertarget{classTestSocket4UDP_abf5ff04e6e0d087155cd89cf8b625898}{
bool {\bfseries \_\-closed}}
\label{classTestSocket4UDP_abf5ff04e6e0d087155cd89cf8b625898}

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

\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\hypertarget{classTestSocket4UDP_a257869c2a66fb4ff84b9592b8066b417}{
\index{TestSocket4UDP@{TestSocket4UDP}!bind@{bind}}
\index{bind@{bind}!TestSocket4UDP@{TestSocket4UDP}}
\subsubsection[{bind}]{\setlength{\rightskip}{0pt plus 5cm}bool TestSocket4UDP::bind (
\begin{DoxyParamCaption}
\item[{{\bf IPv4}}]{addr, }
\item[{uint16\_\-t}]{port}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTestSocket4UDP_a257869c2a66fb4ff84b9592b8066b417}


Bind to interface and port. 

This is an asynchronous request. If \hyperlink{protocolthe-p}{the} request is successfully queued for dispatch then true is returned.

Subsequently, if \hyperlink{protocolthe-p}{the} request is successful \_\-sockid is set to a valid socket identifier, and if unsuccessful \hyperlink{protocolthe-p}{the} number of xrl errors is bumped by one. \hypertarget{classTestSocket4UDP_a57581e72434ebb51a9a58aa0feb17dfd}{
\index{TestSocket4UDP@{TestSocket4UDP}!close@{close}}
\index{close@{close}!TestSocket4UDP@{TestSocket4UDP}}
\subsubsection[{close}]{\setlength{\rightskip}{0pt plus 5cm}bool TestSocket4UDP::close (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTestSocket4UDP_a57581e72434ebb51a9a58aa0feb17dfd}


Request closure of socket. 

This is an asychronous request. If \hyperlink{protocolthe-p}{the} request is successfully queued for dispatch then true is returned.

On success \_\-sockid is cleared. On failure \hyperlink{protocolthe-p}{the} number xrl errors is bumped by one. \hypertarget{classTestSocket4UDP_a3f914899a4a0ca1e76c79e8d636f90a6}{
\index{TestSocket4UDP@{TestSocket4UDP}!common\_\-0\_\-1\_\-get\_\-status@{common\_\-0\_\-1\_\-get\_\-status}}
\index{common\_\-0\_\-1\_\-get\_\-status@{common\_\-0\_\-1\_\-get\_\-status}!TestSocket4UDP@{TestSocket4UDP}}
\subsubsection[{common\_\-0\_\-1\_\-get\_\-status}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4UDP::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{classTestSocket4UDP_a3f914899a4a0ca1e76c79e8d636f90a6}


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

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

Implements \hyperlink{structXrlTestSocket4TargetBase_a49730bf75596f497761844a2a5bfd661}{XrlTestSocket4TargetBase}.

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


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

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

Implements \hyperlink{structXrlTestSocket4TargetBase_a73c2343371fa50e874a35529c668a186}{XrlTestSocket4TargetBase}.

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


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

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

Implements \hyperlink{structXrlTestSocket4TargetBase_ac07267901abc9584b0face95bffc4ecf}{XrlTestSocket4TargetBase}.

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


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

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

Implements \hyperlink{structXrlTestSocket4TargetBase_abcd0b1021f89c9f6c8dd6518d2039204}{XrlTestSocket4TargetBase}.

\hypertarget{classTestSocket4UDP_a841c6765d510278a54a04a7b5bdf32dc}{
\index{TestSocket4UDP@{TestSocket4UDP}!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}!TestSocket4UDP@{TestSocket4UDP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4UDP::socket4\_\-user\_\-0\_\-1\_\-disconnect\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{sockid}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestSocket4UDP_a841c6765d510278a54a04a7b5bdf32dc}


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}.

\hypertarget{classTestSocket4UDP_a6a5c755e6a2a41a29f47f28fa2e08a37}{
\index{TestSocket4UDP@{TestSocket4UDP}!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}!TestSocket4UDP@{TestSocket4UDP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-error\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4UDP::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{[}inline, protected, virtual\mbox{]}}}}
\label{classTestSocket4UDP_a6a5c755e6a2a41a29f47f28fa2e08a37}


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}.

\hypertarget{classTestSocket4UDP_a63690fd967a7919ce8ab090bc573759c}{
\index{TestSocket4UDP@{TestSocket4UDP}!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}!TestSocket4UDP@{TestSocket4UDP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-inbound\_\-connect\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4UDP::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{[}inline, protected, virtual\mbox{]}}}}
\label{classTestSocket4UDP_a63690fd967a7919ce8ab090bc573759c}


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}.

\hypertarget{classTestSocket4UDP_ac8e94299f7ab60bbc14cc0f4e2b3d10e}{
\index{TestSocket4UDP@{TestSocket4UDP}!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}!TestSocket4UDP@{TestSocket4UDP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4UDP::socket4\_\-user\_\-0\_\-1\_\-outgoing\_\-connect\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{sockid}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestSocket4UDP_ac8e94299f7ab60bbc14cc0f4e2b3d10e}


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}.

\hypertarget{classTestSocket4UDP_a8ca393824b4ccd4028a5149bbdf2fec3}{
\index{TestSocket4UDP@{TestSocket4UDP}!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}!TestSocket4UDP@{TestSocket4UDP}}
\subsubsection[{socket4\_\-user\_\-0\_\-1\_\-recv\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestSocket4UDP::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{[}inline, protected, virtual\mbox{]}}}}
\label{classTestSocket4UDP_a8ca393824b4ccd4028a5149bbdf2fec3}


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}.

\hypertarget{classTestSocket4UDP_ac0caf88a25b16e30e3a26110849e7b74}{
\index{TestSocket4UDP@{TestSocket4UDP}!start\_\-sending@{start\_\-sending}}
\index{start\_\-sending@{start\_\-sending}!TestSocket4UDP@{TestSocket4UDP}}
\subsubsection[{start\_\-sending}]{\setlength{\rightskip}{0pt plus 5cm}void TestSocket4UDP::start\_\-sending (
\begin{DoxyParamCaption}
\item[{{\bf IPv4}}]{host, }
\item[{uint16\_\-t}]{port, }
\item[{uint32\_\-t}]{bytes, }
\item[{uint32\_\-t}]{ipg\_\-ms}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTestSocket4UDP_ac0caf88a25b16e30e3a26110849e7b74}


Start sending packets. 


\begin{DoxyParams}{Parameters}
{\em host} & address to send data to. \\
\hline
{\em port} & to send data to. \\
\hline
{\em bytes} & size of each packet. \\
\hline
{\em ipg\_\-ms} & interpacket gap in milliseconds. \\
\hline
\end{DoxyParams}


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\_\-udp.cc\end{DoxyCompactItemize}
