Ejemplo de aplicaciĆ³n cliente \begin{DoxyCode} \textcolor{preprocessor}{#include "\hyperlink{_socket_8h}{Socket.h}"} \textcolor{preprocessor}{#include } \textcolor{preprocessor}{#include "\hyperlink{_socket_exception_8h}{SocketException.h}"} \textcolor{preprocessor}{#include } \textcolor{preprocessor}{#include } \textcolor{preprocessor}{#include } \textcolor{preprocessor}{#include } \textcolor{keyword}{using namespace }std; \textcolor{keywordtype}{void} \hyperlink{client_8cpp_a00a6f7afcba6bb656a7b05c67efa42ba}{exitClient}(\textcolor{keywordtype}{int} signal) \{ cout << \textcolor{stringliteral}{"Server connection terminated unexpectedly"} << endl << \textcolor{stringliteral}{"Exiting"} << endl; exit(-1); \} \textcolor{keywordtype}{int} \hyperlink{client_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4}{main}() \{ signal(SIGPIPE, \hyperlink{client_8cpp_a00a6f7afcba6bb656a7b05c67efa42ba}{exitClient}); signal(SIGINT, \hyperlink{client_8cpp_a00a6f7afcba6bb656a7b05c67efa42ba}{exitClient}); \hyperlink{class_socket}{Socket} s; \textcolor{keywordtype}{string} send, recv, host; \textcolor{keywordtype}{int} port; s.\hyperlink{class_socket_add736ccf41f102910a2b8ac5e77eb8b1}{Create}(); cout << \textcolor{stringliteral}{"Created socket"} << endl; cout << \textcolor{stringliteral}{"Hostname: "}; cin >> host; cout << \textcolor{stringliteral}{"Port: "}; cin >> port; cin.ignore(); s.\hyperlink{class_socket_aa1d074c1aa400e8bca7c7da79b036abe}{Connect}(host,port); cout << \textcolor{stringliteral}{"Connected"} << endl; \textcolor{keywordflow}{while}(\textcolor{keyword}{true}) \{ cout << \textcolor{stringliteral}{"> "}; getline(cin,send); s >> recv; cout << \textcolor{stringliteral}{"Received: "} << recv << endl; \} \} \end{DoxyCode}