\section{TPProto::Connect Class Reference}
\label{classTPProto_1_1Connect}\index{TPProto::Connect@{TPProto::Connect}}
\doxyref{Connect}{p.}{classTPProto_1_1Connect} \doxyref{Frame}{p.}{classTPProto_1_1Frame} class.  


{\tt \#include $<$connect.h$>$}

Inheritance diagram for TPProto::Connect::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classTPProto_1_1Connect}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual {\bf $\sim$Connect} ()\label{classTPProto_1_1Connect_07d73f0b5d5bdf44aad2a137c6fada35}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void {\bf pack\-Buffer} ({\bf Buffer} $\ast$buf)
\begin{CompactList}\small\item\em Packs the \doxyref{Connect}{p.}{classTPProto_1_1Connect} \doxyref{Frame}{p.}{classTPProto_1_1Frame} into a buffer. \item\end{CompactList}\item 
bool {\bf unpack\-Buffer} ({\bf Buffer} $\ast$buf)
\begin{CompactList}\small\item\em Unpacks data from the buffer. \item\end{CompactList}\item 
void {\bf set\-Client\-String} (const std::string \&cs)
\begin{CompactList}\small\item\em Sets the client string. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
\doxyref{Connect}{p.}{classTPProto_1_1Connect} \doxyref{Frame}{p.}{classTPProto_1_1Frame} class. 

This class is the \doxyref{Connect}{p.}{classTPProto_1_1Connect} \doxyref{Frame}{p.}{classTPProto_1_1Frame} sent when creating a connection to the server. It sends a string to the server in the data. \doxyref{Frame\-Codec}{p.}{classTPProto_1_1FrameCodec} is the preferred way of setting the client string as it also adds the library version. 



\subsection{Member Function Documentation}
\index{TPProto::Connect@{TPProto::Connect}!packBuffer@{packBuffer}}
\index{packBuffer@{packBuffer}!TPProto::Connect@{TPProto::Connect}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Connect::pack\-Buffer ({\bf Buffer} $\ast$ {\em buf})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1Connect_6cb622d13258e85e0536fe522a1d10ab}


Packs the \doxyref{Connect}{p.}{classTPProto_1_1Connect} \doxyref{Frame}{p.}{classTPProto_1_1Frame} into a buffer. 

This method packs the client string into the buffer and makes sure the type of this frame is set correctly. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]The \doxyref{Buffer}{p.}{classTPProto_1_1Buffer} to pack the data into. \end{description}
\end{Desc}


Implements {\bf TPProto::Frame} \doxyref{}{p.}{classTPProto_1_1Frame_67b50ee76e90385e56f04202ce1da67e}.\index{TPProto::Connect@{TPProto::Connect}!unpackBuffer@{unpackBuffer}}
\index{unpackBuffer@{unpackBuffer}!TPProto::Connect@{TPProto::Connect}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Connect::unpack\-Buffer ({\bf Buffer} $\ast$ {\em buf})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1Connect_d45e037cf76dab6d511f049be1956f0a}


Unpacks data from the buffer. 

Always returns false because we should never receive one. \begin{Desc}
\item[Returns:]False always. \end{Desc}


Implements {\bf TPProto::Frame} \doxyref{}{p.}{classTPProto_1_1Frame_fe220a4229f471a3cc6a143f7a27e321}.\index{TPProto::Connect@{TPProto::Connect}!setClientString@{setClientString}}
\index{setClientString@{setClientString}!TPProto::Connect@{TPProto::Connect}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Connect::set\-Client\-String (const std::string \& {\em cs})}\label{classTPProto_1_1Connect_0ed2ce825ac5b23574c7191b52cfc734}


Sets the client string. 

The client string is sent in the \doxyref{Connect}{p.}{classTPProto_1_1Connect} \doxyref{Frame}{p.}{classTPProto_1_1Frame}. The perferred method is using the method provided by \doxyref{Frame\-Codec}{p.}{classTPProto_1_1FrameCodec} (which eventually calls this one). \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cs}]The string to be set as the client string. \end{description}
\end{Desc}


The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
tpproto/{\bf connect.h}\item 
tpproto/connect.cpp\end{CompactItemize}
