81 lines
3.9 KiB
TeX
81 lines
3.9 KiB
TeX
\hypertarget{classcore_1_1UDPServerSocket}{}\section{core\+:\+:U\+D\+P\+Server\+Socket Class Reference}
|
|
\label{classcore_1_1UDPServerSocket}\index{core\+::\+U\+D\+P\+Server\+Socket@{core\+::\+U\+D\+P\+Server\+Socket}}
|
|
|
|
|
|
{\ttfamily \#include $<$U\+D\+P\+Server\+Socket.\+h$>$}
|
|
|
|
|
|
|
|
Inheritance diagram for core\+:\+:U\+D\+P\+Server\+Socket\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=278pt]{classcore_1_1UDPServerSocket__inherit__graph}
|
|
\end{center}
|
|
\end{figure}
|
|
|
|
|
|
Collaboration diagram for core\+:\+:U\+D\+P\+Server\+Socket\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=248pt]{classcore_1_1UDPServerSocket__coll__graph}
|
|
\end{center}
|
|
\end{figure}
|
|
\subsection*{Public Member Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
\mbox{\Hypertarget{classcore_1_1UDPServerSocket_a6fee7bc6dc2f94d48734c07cbc918734}\label{classcore_1_1UDPServerSocket_a6fee7bc6dc2f94d48734c07cbc918734}}
|
|
{\bfseries U\+D\+P\+Server\+Socket} (\hyperlink{classcore_1_1EPoll}{E\+Poll} \&e\+Poll, std\+::string url, short int port, std\+::string command\+Name)
|
|
\end{DoxyCompactItemize}
|
|
\subsection*{Protected Member Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
void \hyperlink{classcore_1_1UDPServerSocket_a41933ca153c854a800e3d047ab18313e}{on\+Data\+Received} (std\+::string data) override
|
|
\begin{DoxyCompactList}\small\item\em Called when data is received from the socket. \end{DoxyCompactList}\item
|
|
\mbox{\Hypertarget{classcore_1_1UDPServerSocket_aef32dee99a40a8951a708e99776539d4}\label{classcore_1_1UDPServerSocket_aef32dee99a40a8951a708e99776539d4}}
|
|
int {\bfseries process\+Command} (std\+::string request, std\+::stringstream \&data)
|
|
\end{DoxyCompactItemize}
|
|
\subsection*{Protected Attributes}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
\mbox{\Hypertarget{classcore_1_1UDPServerSocket_a83362532c66271699c4e60d1da2a41bc}\label{classcore_1_1UDPServerSocket_a83362532c66271699c4e60d1da2a41bc}}
|
|
std\+::vector$<$ Session $\ast$ $>$ {\bfseries sessions}
|
|
\end{DoxyCompactItemize}
|
|
\subsection*{Additional Inherited Members}
|
|
|
|
|
|
\subsection{Detailed Description}
|
|
\hyperlink{classcore_1_1UDPSocket}{U\+D\+P\+Socket}
|
|
|
|
Manage a socket connection as a U\+DP server type. Connections to the socket are processed through the session list functionality. A list of sessions is maintained in a vector object.
|
|
|
|
\subsection{Member Function Documentation}
|
|
\mbox{\Hypertarget{classcore_1_1UDPServerSocket_a41933ca153c854a800e3d047ab18313e}\label{classcore_1_1UDPServerSocket_a41933ca153c854a800e3d047ab18313e}}
|
|
\index{core\+::\+U\+D\+P\+Server\+Socket@{core\+::\+U\+D\+P\+Server\+Socket}!on\+Data\+Received@{on\+Data\+Received}}
|
|
\index{on\+Data\+Received@{on\+Data\+Received}!core\+::\+U\+D\+P\+Server\+Socket@{core\+::\+U\+D\+P\+Server\+Socket}}
|
|
\subsubsection{\texorpdfstring{on\+Data\+Received()}{onDataReceived()}}
|
|
{\footnotesize\ttfamily void core\+::\+U\+D\+P\+Server\+Socket\+::on\+Data\+Received (\begin{DoxyParamCaption}\item[{std\+::string}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [protected]}, {\ttfamily [virtual]}}
|
|
|
|
|
|
|
|
Called when data is received from the socket.
|
|
|
|
The on\+Connected method is called when the socket is ready to communicate. Writing to the socket can begin on this call to initiate a contact with the remote device. The on\+Data\+Received method is called when the socket has received an event from epoll and there is data ready to be read from the socket. The default handler will pull the data and put it into the streambuf for the socket. E\+P\+O\+L\+L\+IN
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em data} & the data that has been received from the socket. \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
|
|
|
|
Reimplemented from \hyperlink{classcore_1_1Socket_ac8d6a2c54696eb6fc2024cf6bcf6b4e5}{core\+::\+Socket}.
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
|
|
\item
|
|
U\+D\+P\+Server\+Socket.\+h\item
|
|
U\+D\+P\+Server\+Socket.\+cpp\end{DoxyCompactItemize}
|