\section{CTCPIPComm\-Receive Klassenreferenz}
\label{classCTCPIPCommReceive}\index{CTCPIPCommReceive@{CTCPIPCommReceive}}
Class of CTCPIPComm\-Receive.  


{\tt \#include $<$TCPIPComm\-Receive.h$>$}

Klassendiagramm f\"{u}r CTCPIPComm\-Receive::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4cm]{classCTCPIPCommReceive}
\end{center}
\end{figure}
\subsection*{\"{O}ffentliche Methoden}
\begin{CompactItemize}
\item 
{\bf CTCPIPComm\-Receive} (const long Max\-Recv\-Buffer\-Len=8192)
\begin{CompactList}\small\item\em Conctuctor creates a new object of {\bf CTCPIPComm\-Connect}{\rm (S.\,\pageref{classCTCPIPCommConnect})}. \item\end{CompactList}\item 
virtual {\bf $\sim$CTCPIPComm\-Receive} ()\label{classCTCPIPCommReceive_a1}

\begin{CompactList}\small\item\em destructor \item\end{CompactList}\item 
void {\bf Initialize} (const SOCKET Socket)
\begin{CompactList}\small\item\em Initialize Initializes and stars the connection thread. \item\end{CompactList}\item 
bool {\bf Start\-Receiving} (void)
\begin{CompactList}\small\item\em Connect\-Request Tries to establish the connection to the communication partner. \item\end{CompactList}\item 
int {\bf Get\-Last\-Socket\-Error} (void) const
\begin{CompactList}\small\item\em Get\-Last\-Socket\-Error Returns the last socket error occured. \item\end{CompactList}\item 
bool {\bf Terminating} (void) const
\begin{CompactList}\small\item\em Terminating (get state) Returns the state whether the class is terminating (destructor) or not. \item\end{CompactList}\item 
void {\bf Terminating} (bool Terminating)
\begin{CompactList}\small\item\em Terminating (set state) Sets the state Terminating according to the parameter. \item\end{CompactList}\end{CompactItemize}
\subsection*{Gesch\"{u}tzte Methoden}
\begin{CompactItemize}
\item 
virtual void {\bf Receive} (void $\ast$p\-Data, long Data\-Len)=0
\begin{CompactList}\small\item\em Receive Indicates that the TCP/IP connection is established. \item\end{CompactList}\item 
virtual void {\bf Recv\-Dis\-Ind} (void)=0
\begin{CompactList}\small\item\em Recv\-Dis\-Ind Indicates that the TCP/IP connection was broken down. \item\end{CompactList}\item 
void {\bf Initialize\-Class} (const long Max\-Recv\-Buffer\-Len)
\begin{CompactList}\small\item\em Initializes object data. \item\end{CompactList}\end{CompactItemize}
\subsection*{Private, statische Methoden}
\begin{CompactItemize}
\item 
void {\bf Recv\-Thread} ({\bf CTCPIPComm\-Receive} $\ast$p\-Class)
\begin{CompactList}\small\item\em Recv\-Thread (static) Start function for the Receive Thread. \item\end{CompactList}\end{CompactItemize}
\subsection*{Private Attribute}
\begin{CompactItemize}
\item 
SOCKET {\bf m\_\-Socket}\label{classCTCPIPCommReceive_r0}

\item 
int {\bf m\_\-Last\-Socket\-Error}\label{classCTCPIPCommReceive_r1}

\item 
DWORD {\bf m\_\-Thread\-ID}\label{classCTCPIPCommReceive_r2}

\item 
HANDLE {\bf m\_\-Thread\-Handle}\label{classCTCPIPCommReceive_r3}

\item 
HANDLE {\bf m\_\-h\-Event\-Terminate}\label{classCTCPIPCommReceive_r4}

\item 
HANDLE {\bf m\_\-h\-Event\-Terminate\-Finished}\label{classCTCPIPCommReceive_r5}

\item 
HANDLE {\bf m\_\-h\-Event\-Start\-Receiving}\label{classCTCPIPCommReceive_r6}

\item 
void $\ast$ {\bf m\_\-p\-Recv\-Buffer}\label{classCTCPIPCommReceive_r7}

\item 
long {\bf m\_\-Max\-Recv\-Buffer\-Len}\label{classCTCPIPCommReceive_r8}

\item 
bool {\bf m\_\-Terminating}\label{classCTCPIPCommReceive_r9}

\end{CompactItemize}


\subsection{Ausf\"{u}hrliche Beschreibung}
Class of CTCPIPComm\-Receive. 

\begin{Desc}
\item[Version:]1.1 \end{Desc}
\begin{Desc}
\item[Autor:]Udo Weber \end{Desc}




\subsection{Beschreibung der Konstruktoren und Destruktoren}
\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!CTCPIPCommReceive@{CTCPIPCommReceive}}
\index{CTCPIPCommReceive@{CTCPIPCommReceive}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}CTCPIPComm\-Receive::CTCPIPComm\-Receive (const long {\em Max\-Recv\-Buffer\-Len} = {\tt 8192})}\label{classCTCPIPCommReceive_a0}


Conctuctor creates a new object of {\bf CTCPIPComm\-Connect}{\rm (S.\,\pageref{classCTCPIPCommConnect})}. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em Max\-Recv\-Buffer\-Len}]Maximum Lenght receiving messages \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]- \end{Desc}


\subsection{Dokumentation der Elementfunktionen}
\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!GetLastSocketError@{GetLastSocketError}}
\index{GetLastSocketError@{GetLastSocketError}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int CTCPIPComm\-Receive::Get\-Last\-Socket\-Error (void) const\hspace{0.3cm}{\tt  [inline]}}\label{classCTCPIPCommReceive_a4}


Get\-Last\-Socket\-Error Returns the last socket error occured. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em -}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]Last socket error \end{Desc}


Erneute Implementation in {\bf CTCPIPComm} {\rm (S.\,\pageref{classCTCPIPComm_a2})}.\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CTCPIPComm\-Receive::Initialize (const SOCKET {\em Socket})}\label{classCTCPIPCommReceive_a2}


Initialize Initializes and stars the connection thread. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em Socket}]The socket to be used for receiving data \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]- \end{Desc}
\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!InitializeClass@{InitializeClass}}
\index{InitializeClass@{InitializeClass}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CTCPIPComm\-Receive::Initialize\-Class (const long {\em Max\-Recv\-Buffer\-Len})\hspace{0.3cm}{\tt  [protected]}}\label{classCTCPIPCommReceive_b2}


Initializes object data. 

Use this to Initialize the class object after construction. \begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em Max\-Recv\-Buffer\-Len}]Maximum Lenght receiving messages \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]- \end{Desc}
\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!Receive@{Receive}}
\index{Receive@{Receive}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void CTCPIPComm\-Receive::Receive (void $\ast$ {\em p\-Data}, long {\em Data\-Len})\hspace{0.3cm}{\tt  [protected, pure virtual]}}\label{classCTCPIPCommReceive_b0}


Receive Indicates that the TCP/IP connection is established. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em p\-Data}]Pointer to the data received \item[{\em Data\-Len}]Length of the received data \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]- \end{Desc}


Implementiert in {\bf CGateway\-Security} {\rm (S.\,\pageref{classCGatewaySecurity_a5})} und {\bf CGateway\-Server} {\rm (S.\,\pageref{classCGatewayServer_a4})}.\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!RecvDisInd@{RecvDisInd}}
\index{RecvDisInd@{RecvDisInd}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void CTCPIPComm\-Receive::Recv\-Dis\-Ind (void)\hspace{0.3cm}{\tt  [protected, pure virtual]}}\label{classCTCPIPCommReceive_b1}


Recv\-Dis\-Ind Indicates that the TCP/IP connection was broken down. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em -}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]- \end{Desc}


Implementiert in {\bf CTCPIPComm} {\rm (S.\,\pageref{classCTCPIPComm_d2})}.\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!RecvThread@{RecvThread}}
\index{RecvThread@{RecvThread}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CTCPIPComm\-Receive::Recv\-Thread ({\bf CTCPIPComm\-Receive} $\ast$ {\em p\-Class})\hspace{0.3cm}{\tt  [static, private]}}\label{classCTCPIPCommReceive_h0}


Recv\-Thread (static) Start function for the Receive Thread. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em p\-Class}]Pointer to the current class \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]- \end{Desc}
\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!StartReceiving@{StartReceiving}}
\index{StartReceiving@{StartReceiving}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool CTCPIPComm\-Receive::Start\-Receiving (void)}\label{classCTCPIPCommReceive_a3}


Connect\-Request Tries to establish the connection to the communication partner. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em -}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]true if function call was successful \end{Desc}
\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!Terminating@{Terminating}}
\index{Terminating@{Terminating}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CTCPIPComm\-Receive::Terminating (bool {\em Terminating})\hspace{0.3cm}{\tt  [inline]}}\label{classCTCPIPCommReceive_a6}


Terminating (set state) Sets the state Terminating according to the parameter. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em Terminating}]TRUE if derived class is terminating (destructor) \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]- \end{Desc}
\index{CTCPIPCommReceive@{CTCPIPComm\-Receive}!Terminating@{Terminating}}
\index{Terminating@{Terminating}!CTCPIPCommReceive@{CTCPIPComm\-Receive}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool CTCPIPComm\-Receive::Terminating (void) const\hspace{0.3cm}{\tt  [inline]}}\label{classCTCPIPCommReceive_a5}


Terminating (get state) Returns the state whether the class is terminating (destructor) or not. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em -}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]True if terminating \end{Desc}


Die Dokumentation f\"{u}r diese Klasse wurde erzeugt aufgrund der Dateien:\begin{CompactItemize}
\item 
TCPIPComm\-Receive.h\item 
TCPIPComm\-Receive.cpp\end{CompactItemize}
