\hypertarget{client_8cpp}{\section{Referencia del Archivo /home/imanol/devel/eclipse/\-P\-A\-D/\-J\-Chat\-Client/src/client.cpp}
\label{client_8cpp}\index{/home/imanol/devel/eclipse/\-P\-A\-D/\-J\-Chat\-Client/src/client.\-cpp@{/home/imanol/devel/eclipse/\-P\-A\-D/\-J\-Chat\-Client/src/client.\-cpp}}
}


Fichero de implementación de un cliente.  


{\ttfamily \#include \char`\"{}Socket.\-h\char`\"{}}\\*
{\ttfamily \#include $<$iostream$>$}\\*
{\ttfamily \#include \char`\"{}Socket\-Exception.\-h\char`\"{}}\\*
{\ttfamily \#include $<$sstream$>$}\\*
{\ttfamily \#include $<$signal.\-h$>$}\\*
{\ttfamily \#include $<$cstdlib$>$}\\*
{\ttfamily \#include $<$sys/time.\-h$>$}\\*
\subsection*{Funciones}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{client_8cpp_a00a6f7afcba6bb656a7b05c67efa42ba}{exit\-Client} (int signal)
\begin{DoxyCompactList}\small\item\em Método para terminar el cliente. \end{DoxyCompactList}\item 
void \hyperlink{client_8cpp_aad6144e222ae07102486edee29350121}{process\-C\-M\-D} (string cmd)
\item 
int \hyperlink{client_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4}{main} ()
\begin{DoxyCompactList}\small\item\em Método principal del cliente. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{client_8cpp_ab36823025f12a809217f7771125658c2}{connected}
\end{DoxyCompactItemize}


\subsection{Descripción detallada}
Fichero de implementación de un cliente. \begin{DoxyAuthor}{Autor}
Imanol Barba Sabariego 
\end{DoxyAuthor}
\begin{DoxyDate}{Fecha}
13/06/2013
\end{DoxyDate}
En este fichero se implementa un cliente para poder usar con el servidor creado, usando la clase \hyperlink{class_socket}{Socket}. 

\subsection{Documentación de las funciones}
\hypertarget{client_8cpp_a00a6f7afcba6bb656a7b05c67efa42ba}{\index{client.\-cpp@{client.\-cpp}!exit\-Client@{exit\-Client}}
\index{exit\-Client@{exit\-Client}!client.cpp@{client.\-cpp}}
\subsubsection[{exit\-Client}]{\setlength{\rightskip}{0pt plus 5cm}void exit\-Client (
\begin{DoxyParamCaption}
\item[{int}]{signal}
\end{DoxyParamCaption}
)}}\label{client_8cpp_a00a6f7afcba6bb656a7b05c67efa42ba}


Método para terminar el cliente. 

Este método se usa para terminar el cliente immediatamente en el caso que el servidor cierre la conexión de forma inesperada, capturando el signal S\-I\-G\-P\-I\-P\-E. 
\begin{DoxyParams}{Parámetros}
{\em signal} & Parámetro que captura el signal recibido \\
\hline
\end{DoxyParams}
\hypertarget{client_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4}{\index{client.\-cpp@{client.\-cpp}!main@{main}}
\index{main@{main}!client.cpp@{client.\-cpp}}
\subsubsection[{main}]{\setlength{\rightskip}{0pt plus 5cm}int main (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{client_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4}


Método principal del cliente. 

Este método inicializa el \hyperlink{class_socket}{Socket}, establece la conexión y realiza las acciones que se le hayan programado para comunicarse con el servidor. \hypertarget{client_8cpp_aad6144e222ae07102486edee29350121}{\index{client.\-cpp@{client.\-cpp}!process\-C\-M\-D@{process\-C\-M\-D}}
\index{process\-C\-M\-D@{process\-C\-M\-D}!client.cpp@{client.\-cpp}}
\subsubsection[{process\-C\-M\-D}]{\setlength{\rightskip}{0pt plus 5cm}void process\-C\-M\-D (
\begin{DoxyParamCaption}
\item[{string}]{cmd}
\end{DoxyParamCaption}
)}}\label{client_8cpp_aad6144e222ae07102486edee29350121}


\subsection{Documentación de las variables}
\hypertarget{client_8cpp_ab36823025f12a809217f7771125658c2}{\index{client.\-cpp@{client.\-cpp}!connected@{connected}}
\index{connected@{connected}!client.cpp@{client.\-cpp}}
\subsubsection[{connected}]{\setlength{\rightskip}{0pt plus 5cm}bool connected}}\label{client_8cpp_ab36823025f12a809217f7771125658c2}
