Blame view

JChatClient/doc/latex/client_8cpp.tex 3.69 KB
1
2
\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}}
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
}


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 
21
22
void \hyperlink{client_8cpp_aad6144e222ae07102486edee29350121}{process\-C\-M\-D} (string cmd)
\item 
23
24
int \hyperlink{client_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4}{main} ()
\begin{DoxyCompactList}\small\item\em Método principal del cliente. \end{DoxyCompactList}\end{DoxyCompactItemize}
25
26
27
28
29
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{client_8cpp_ab36823025f12a809217f7771125658c2}{connected}
\end{DoxyCompactItemize}
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68


\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. 
69
70
71
72
73
74
75
76
77
78
79
80
81
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}