184 lines
9.5 KiB
TeX
184 lines
9.5 KiB
TeX
\hypertarget{classcore_1_1EPoll}{}\doxysection{core\+::EPoll Class Reference}
|
|
\label{classcore_1_1EPoll}\index{core::EPoll@{core::EPoll}}
|
|
|
|
|
|
{\ttfamily \#include $<$EPoll.\+h$>$}
|
|
|
|
|
|
|
|
Inheritance diagram for core\+::EPoll\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=174pt]{classcore_1_1EPoll__inherit__graph}
|
|
\end{center}
|
|
\end{figure}
|
|
|
|
|
|
Collaboration diagram for core\+::EPoll\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=174pt]{classcore_1_1EPoll__coll__graph}
|
|
\end{center}
|
|
\end{figure}
|
|
\doxysubsection*{Public Member Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
\mbox{\hyperlink{classcore_1_1EPoll_a2fd5cc4336b5f72990ecc0e7ea3d7641}{EPoll}} ()
|
|
\item
|
|
\mbox{\hyperlink{classcore_1_1EPoll_a8e7a2496d684b745a6410f9bd3e88534}{$\sim$\+EPoll}} ()
|
|
\item
|
|
bool \mbox{\hyperlink{classcore_1_1EPoll_aaefe2caef75eb538af90cb34682d277b}{start}} (int number\+Of\+Threads, int \mbox{\hyperlink{classcore_1_1EPoll_acfcef2513d94f7b9a191fed3dc744d90}{max\+Sockets}})
|
|
\begin{DoxyCompactList}\small\item\em Start the BMAEPoll processing. \end{DoxyCompactList}\item
|
|
bool \mbox{\hyperlink{classcore_1_1EPoll_a0c2865acd31d14fbf19dbc42cc084ddc}{stop}} ()
|
|
\begin{DoxyCompactList}\small\item\em Stop and shut down the BMAEPoll processing. \end{DoxyCompactList}\item
|
|
bool \mbox{\hyperlink{classcore_1_1EPoll_a301b46b71ac7ac61a687ff723fe269b3}{is\+Stopping}} ()
|
|
\begin{DoxyCompactList}\small\item\em Returns a true if the stop command has been requested. \end{DoxyCompactList}\item
|
|
int \mbox{\hyperlink{classcore_1_1EPoll_a1e52017e1deae15c1c87c6b6a099e1ed}{get\+Descriptor}} ()
|
|
\begin{DoxyCompactList}\small\item\em Return the descriptor for the e\+Poll socket. \end{DoxyCompactList}\item
|
|
void \mbox{\hyperlink{classcore_1_1EPoll_a3238b150b5d0a57eb2e1b17daa236d3b}{event\+Received}} (struct epoll\+\_\+event event)
|
|
\begin{DoxyCompactList}\small\item\em Dispatch event to appropriate socket. \end{DoxyCompactList}\item
|
|
int \mbox{\hyperlink{classcore_1_1EPoll_a22b5f1545aff3162040844be043abcce}{process\+Command}} (coreutils\+::\+ZString \&request, \mbox{\hyperlink{classcore_1_1TCPSession}{TCPSession}} \&session) override
|
|
\begin{DoxyCompactList}\small\item\em Output the threads array to the console. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
|
\doxysubsection*{Public Attributes}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
\mbox{\Hypertarget{classcore_1_1EPoll_a61aa8c4c90733287fd497f860bf521ab}\label{classcore_1_1EPoll_a61aa8c4c90733287fd497f860bf521ab}}
|
|
volatile long long {\bfseries event\+Id} = 0
|
|
\item
|
|
int \mbox{\hyperlink{classcore_1_1EPoll_acfcef2513d94f7b9a191fed3dc744d90}{max\+Sockets}}
|
|
\begin{DoxyCompactList}\small\item\em The maximum number of socket allowed. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
|
|
|
|
|
\doxysubsection{Detailed Description}
|
|
\mbox{\hyperlink{classcore_1_1EPoll}{EPoll}}
|
|
|
|
Manage socket events from the epoll system call.
|
|
|
|
Use this object to establish a socket server using the epoll network structure of Linux.
|
|
|
|
Use this object to establish the basis of working with multiple sockets of all sorts using the epoll capabilities of the Linux platform. \mbox{\hyperlink{classcore_1_1Socket}{Socket}} objects can register with \mbox{\hyperlink{classcore_1_1EPoll}{EPoll}} which will establish a communication mechanism with that socket.
|
|
|
|
The maximum number of sockets to communicate with is specified on the start method.
|
|
|
|
Threads are used to establish a read queue for epoll. The desired number of threads (or queues) is established by a parameter on the start method.
|
|
|
|
\doxysubsection{Constructor \& Destructor Documentation}
|
|
\mbox{\Hypertarget{classcore_1_1EPoll_a2fd5cc4336b5f72990ecc0e7ea3d7641}\label{classcore_1_1EPoll_a2fd5cc4336b5f72990ecc0e7ea3d7641}}
|
|
\index{core::EPoll@{core::EPoll}!EPoll@{EPoll}}
|
|
\index{EPoll@{EPoll}!core::EPoll@{core::EPoll}}
|
|
\doxysubsubsection{\texorpdfstring{EPoll()}{EPoll()}}
|
|
{\footnotesize\ttfamily core\+::\+EPoll\+::\+EPoll (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
|
|
|
|
The constructor for the BMAEPoll object. \mbox{\Hypertarget{classcore_1_1EPoll_a8e7a2496d684b745a6410f9bd3e88534}\label{classcore_1_1EPoll_a8e7a2496d684b745a6410f9bd3e88534}}
|
|
\index{core::EPoll@{core::EPoll}!````~EPoll@{$\sim$EPoll}}
|
|
\index{````~EPoll@{$\sim$EPoll}!core::EPoll@{core::EPoll}}
|
|
\doxysubsubsection{\texorpdfstring{$\sim$EPoll()}{~EPoll()}}
|
|
{\footnotesize\ttfamily core\+::\+EPoll\+::$\sim$\+EPoll (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
|
|
|
|
The destructor for the BMAEPoll object.
|
|
|
|
\doxysubsection{Member Function Documentation}
|
|
\mbox{\Hypertarget{classcore_1_1EPoll_a3238b150b5d0a57eb2e1b17daa236d3b}\label{classcore_1_1EPoll_a3238b150b5d0a57eb2e1b17daa236d3b}}
|
|
\index{core::EPoll@{core::EPoll}!eventReceived@{eventReceived}}
|
|
\index{eventReceived@{eventReceived}!core::EPoll@{core::EPoll}}
|
|
\doxysubsubsection{\texorpdfstring{eventReceived()}{eventReceived()}}
|
|
{\footnotesize\ttfamily void core\+::\+EPoll\+::event\+Received (\begin{DoxyParamCaption}\item[{struct epoll\+\_\+event}]{event }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
Dispatch event to appropriate socket.
|
|
|
|
Receive the epoll events and dispatch the event to the socket making the request. \mbox{\Hypertarget{classcore_1_1EPoll_a1e52017e1deae15c1c87c6b6a099e1ed}\label{classcore_1_1EPoll_a1e52017e1deae15c1c87c6b6a099e1ed}}
|
|
\index{core::EPoll@{core::EPoll}!getDescriptor@{getDescriptor}}
|
|
\index{getDescriptor@{getDescriptor}!core::EPoll@{core::EPoll}}
|
|
\doxysubsubsection{\texorpdfstring{getDescriptor()}{getDescriptor()}}
|
|
{\footnotesize\ttfamily int core\+::\+EPoll\+::get\+Descriptor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
Return the descriptor for the e\+Poll socket.
|
|
|
|
Use this method to obtain the current descriptor socket number for the epoll function call. \mbox{\Hypertarget{classcore_1_1EPoll_a301b46b71ac7ac61a687ff723fe269b3}\label{classcore_1_1EPoll_a301b46b71ac7ac61a687ff723fe269b3}}
|
|
\index{core::EPoll@{core::EPoll}!isStopping@{isStopping}}
|
|
\index{isStopping@{isStopping}!core::EPoll@{core::EPoll}}
|
|
\doxysubsubsection{\texorpdfstring{isStopping()}{isStopping()}}
|
|
{\footnotesize\ttfamily bool core\+::\+EPoll\+::is\+Stopping (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
Returns a true if the stop command has been requested.
|
|
|
|
This method returns a true if the \mbox{\hyperlink{classcore_1_1EPoll_a0c2865acd31d14fbf19dbc42cc084ddc}{stop()}} method has been called and the epoll system is shutting. \mbox{\Hypertarget{classcore_1_1EPoll_a22b5f1545aff3162040844be043abcce}\label{classcore_1_1EPoll_a22b5f1545aff3162040844be043abcce}}
|
|
\index{core::EPoll@{core::EPoll}!processCommand@{processCommand}}
|
|
\index{processCommand@{processCommand}!core::EPoll@{core::EPoll}}
|
|
\doxysubsubsection{\texorpdfstring{processCommand()}{processCommand()}}
|
|
{\footnotesize\ttfamily int core\+::\+EPoll\+::process\+Command (\begin{DoxyParamCaption}\item[{coreutils\+::\+ZString \&}]{request, }\item[{\mbox{\hyperlink{classcore_1_1TCPSession}{TCPSession}} \&}]{session }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}
|
|
|
|
|
|
|
|
Output the threads array to the console.
|
|
|
|
The \mbox{\hyperlink{classcore_1_1EPoll_a22b5f1545aff3162040844be043abcce}{process\+Command()}} method displays the thread array to the requesting console via the session passed as parameter.
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em session} & the session to write the requested data to. \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
|
|
|
|
Reimplemented from \mbox{\hyperlink{classcore_1_1Command_a95176f2532c38ee14e3fee40ee28b1bd}{core\+::\+Command}}.
|
|
|
|
\mbox{\Hypertarget{classcore_1_1EPoll_aaefe2caef75eb538af90cb34682d277b}\label{classcore_1_1EPoll_aaefe2caef75eb538af90cb34682d277b}}
|
|
\index{core::EPoll@{core::EPoll}!start@{start}}
|
|
\index{start@{start}!core::EPoll@{core::EPoll}}
|
|
\doxysubsubsection{\texorpdfstring{start()}{start()}}
|
|
{\footnotesize\ttfamily bool core\+::\+EPoll\+::start (\begin{DoxyParamCaption}\item[{int}]{number\+Of\+Threads, }\item[{int}]{max\+Sockets }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
Start the BMAEPoll processing.
|
|
|
|
Use the \mbox{\hyperlink{classcore_1_1EPoll_aaefe2caef75eb538af90cb34682d277b}{start()}} method to initiate the threads and begin epoll queue processing.
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em number\+Of\+Threads} & the number of threads to start for processing epoll entries. \\
|
|
\hline
|
|
{\em max\+Sockets} & the maximum number of open sockets that epoll will manage. \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\mbox{\Hypertarget{classcore_1_1EPoll_a0c2865acd31d14fbf19dbc42cc084ddc}\label{classcore_1_1EPoll_a0c2865acd31d14fbf19dbc42cc084ddc}}
|
|
\index{core::EPoll@{core::EPoll}!stop@{stop}}
|
|
\index{stop@{stop}!core::EPoll@{core::EPoll}}
|
|
\doxysubsubsection{\texorpdfstring{stop()}{stop()}}
|
|
{\footnotesize\ttfamily bool core\+::\+EPoll\+::stop (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
Stop and shut down the BMAEPoll processing.
|
|
|
|
Use the \mbox{\hyperlink{classcore_1_1EPoll_a0c2865acd31d14fbf19dbc42cc084ddc}{stop()}} method to initiate the shutdown process for the epoll socket management.
|
|
|
|
A complete shutdown of all managed sockets will be initiated by this method call.
|
|
|
|
\doxysubsection{Member Data Documentation}
|
|
\mbox{\Hypertarget{classcore_1_1EPoll_acfcef2513d94f7b9a191fed3dc744d90}\label{classcore_1_1EPoll_acfcef2513d94f7b9a191fed3dc744d90}}
|
|
\index{core::EPoll@{core::EPoll}!maxSockets@{maxSockets}}
|
|
\index{maxSockets@{maxSockets}!core::EPoll@{core::EPoll}}
|
|
\doxysubsubsection{\texorpdfstring{maxSockets}{maxSockets}}
|
|
{\footnotesize\ttfamily int core\+::\+EPoll\+::max\+Sockets}
|
|
|
|
|
|
|
|
The maximum number of socket allowed.
|
|
|
|
The maximum number of sockets that can be managed by the epoll system.
|
|
|
|
The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
|
|
\item
|
|
EPoll.\+h\item
|
|
EPoll.\+cpp\end{DoxyCompactItemize}
|