You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.7 KiB
53 lines
1.7 KiB
\hypertarget{connect_8c}{
|
|
\section{src/socket/connect.c File Reference}
|
|
\label{connect_8c}\index{src/socket/connect.c@{src/socket/connect.c}}
|
|
}
|
|
{\ttfamily \#include $<$stdlib.h$>$}\par
|
|
{\ttfamily \#include $<$errno.h$>$}\par
|
|
{\ttfamily \#include \char`\"{}socket.h\char`\"{}}\par
|
|
{\ttfamily \#include \char`\"{}interface/class.h\char`\"{}}\par
|
|
{\ttfamily \#include \char`\"{}interface/logger.h\char`\"{}}\par
|
|
Include dependency graph for connect.c:
|
|
\subsection*{Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
void \hyperlink{connect_8c_adbfc4792c437102f20e2c86c4ee8581b}{socketConnect} (\hyperlink{structSock}{Sock} this, const char $\ast$addr)
|
|
\end{DoxyCompactItemize}
|
|
|
|
|
|
\subsection{Function Documentation}
|
|
\hypertarget{connect_8c_adbfc4792c437102f20e2c86c4ee8581b}{
|
|
\index{connect.c@{connect.c}!socketConnect@{socketConnect}}
|
|
\index{socketConnect@{socketConnect}!connect.c@{connect.c}}
|
|
\subsubsection[{socketConnect}]{\setlength{\rightskip}{0pt plus 5cm}void socketConnect (
|
|
\begin{DoxyParamCaption}
|
|
\item[{{\bf Sock}}]{this, }
|
|
\item[{const char $\ast$}]{addr}
|
|
\end{DoxyParamCaption}
|
|
)}}
|
|
\label{connect_8c_adbfc4792c437102f20e2c86c4ee8581b}
|
|
|
|
|
|
Definition at line 10 of file connect.c.
|
|
|
|
|
|
\begin{DoxyCode}
|
|
{
|
|
inet_pton(AF_INET, addr, &((this->addr).sin_addr));
|
|
(this->addr).sin_family = AF_INET; /* Internet address family */
|
|
(this->addr).sin_port = htons(this->port); /* Local port */
|
|
|
|
if (-1 == connect(this->handle, (struct sockaddr*) &(this->addr), sizeof(
|
|
this->addr))) {
|
|
loggerLog(this->log, LOGGER_CRIT,
|
|
"error connection socket: %s - service terminated",
|
|
strerror(errno));
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
}
|
|
\end{DoxyCode}
|
|
|
|
|
|
Here is the call graph for this function:
|
|
|
|
|