\hypertarget{classcore_1_1_session}{}\section{core\+:\+:Session Class Reference}
\label{classcore_1_1_session}\index{core\+::\+Session@{core\+::\+Session}}


{\ttfamily \#include $<$Session.\+h$>$}



Inheritance diagram for core\+:\+:Session\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=308pt]{classcore_1_1_session__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for core\+:\+:Session\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classcore_1_1_session__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classcore_1_1_session_aec54baa5b60cd7dd0e64a095a4e1a908}\label{classcore_1_1_session_aec54baa5b60cd7dd0e64a095a4e1a908}} 
{\bfseries Session} (\hyperlink{classcore_1_1_e_poll}{E\+Poll} \&e\+Poll, \hyperlink{classcore_1_1_service}{Service} \&service)
\item 
virtual void \hyperlink{classcore_1_1_session_a2813939a9b7b79ebe1963a0b11a374b2}{output} (std\+::stringstream \&data)
\item 
void \hyperlink{classcore_1_1_session_af78d7caeea09924ee5227490c15aecfc}{send} ()
\item 
void \hyperlink{classcore_1_1_session_a0b1722c6abd693702ffd15a810844313}{send\+To\+All} ()
\item 
void \hyperlink{classcore_1_1_session_a17ff9ad6ccf3a0588b59820ba5ba60e4}{send\+To\+All} (\hyperlink{classcore_1_1_session_filter}{Session\+Filter} filter)
\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classcore_1_1_session_a0fb85764a1816114aa3b6cea2f4a7a35}\label{classcore_1_1_session_a0fb85764a1816114aa3b6cea2f4a7a35}} 
std\+::stringstream {\bfseries out}
\item 
\mbox{\Hypertarget{classcore_1_1_session_a6e0fbc7ead78161d2c301842bce7cd86}\label{classcore_1_1_session_a6e0fbc7ead78161d2c301842bce7cd86}} 
\hyperlink{classcore_1_1_service}{Service} \& {\bfseries service}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classcore_1_1_session_aea251cf98c7f1e4d106af5682f43d8c2}{on\+Data\+Received} (std\+::string data) override
\begin{DoxyCompactList}\small\item\em Called when data is received from the socket. \end{DoxyCompactList}\item 
void \hyperlink{classcore_1_1_session_a9c9596293e6051a35197866f5b1b70ce}{on\+Connected} () override
\begin{DoxyCompactList}\small\item\em Called when socket is open and ready to communicate. \end{DoxyCompactList}\item 
virtual void \hyperlink{classcore_1_1_session_a35b030a36e9e6c72cb4c643519e8e55b}{protocol} (std\+::string data)
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
\hyperlink{classcore_1_1_session}{Session}

\hyperlink{classcore_1_1_session}{Session} defines the nature of the interaction with the client and stores persistent data for a defined session. B\+M\+A\+Session objects are not sockets but instead provide a communications control mechanism. Protocol conversations are provided through extensions from this object. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{classcore_1_1_session_a9c9596293e6051a35197866f5b1b70ce}\label{classcore_1_1_session_a9c9596293e6051a35197866f5b1b70ce}} 
\index{core\+::\+Session@{core\+::\+Session}!on\+Connected@{on\+Connected}}
\index{on\+Connected@{on\+Connected}!core\+::\+Session@{core\+::\+Session}}
\subsubsection{\texorpdfstring{on\+Connected()}{onConnected()}}
{\footnotesize\ttfamily void core\+::\+Session\+::on\+Connected (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [protected]}, {\ttfamily [virtual]}}



Called when socket is open and ready to communicate. 

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. 

Reimplemented from \hyperlink{classcore_1_1_socket_a96b8919a4b5580e389df810a4820e2e0}{core\+::\+Socket}.

\mbox{\Hypertarget{classcore_1_1_session_aea251cf98c7f1e4d106af5682f43d8c2}\label{classcore_1_1_session_aea251cf98c7f1e4d106af5682f43d8c2}} 
\index{core\+::\+Session@{core\+::\+Session}!on\+Data\+Received@{on\+Data\+Received}}
\index{on\+Data\+Received@{on\+Data\+Received}!core\+::\+Session@{core\+::\+Session}}
\subsubsection{\texorpdfstring{on\+Data\+Received()}{onDataReceived()}}
{\footnotesize\ttfamily void core\+::\+Session\+::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\+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}


Implements \hyperlink{classcore_1_1_socket_add22bdee877319a372db2fd707dc5a1c}{core\+::\+Socket}.

\mbox{\Hypertarget{classcore_1_1_session_a2813939a9b7b79ebe1963a0b11a374b2}\label{classcore_1_1_session_a2813939a9b7b79ebe1963a0b11a374b2}} 
\index{core\+::\+Session@{core\+::\+Session}!output@{output}}
\index{output@{output}!core\+::\+Session@{core\+::\+Session}}
\subsubsection{\texorpdfstring{output()}{output()}}
{\footnotesize\ttfamily void core\+::\+Session\+::output (\begin{DoxyParamCaption}\item[{std\+::stringstream \&}]{out }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

The output method is called by a socket session (B\+M\+A\+Session) and will output the detail information for the client socket. When extending B\+M\+A\+T\+C\+P\+Socket or B\+M\+A\+Session you can override the method to add attributes to the list. 

Reimplemented from \hyperlink{classcore_1_1_t_c_p_socket_afacf7528ff3c9ac077d7b5a49e2116fd}{core\+::\+T\+C\+P\+Socket}.



Reimplemented in \hyperlink{classcore_1_1_t_l_s_session_ae55de8a035d1ddc560cf619b2030af43}{core\+::\+T\+L\+S\+Session}.

\mbox{\Hypertarget{classcore_1_1_session_a35b030a36e9e6c72cb4c643519e8e55b}\label{classcore_1_1_session_a35b030a36e9e6c72cb4c643519e8e55b}} 
\index{core\+::\+Session@{core\+::\+Session}!protocol@{protocol}}
\index{protocol@{protocol}!core\+::\+Session@{core\+::\+Session}}
\subsubsection{\texorpdfstring{protocol()}{protocol()}}
{\footnotesize\ttfamily void core\+::\+Session\+::protocol (\begin{DoxyParamCaption}\item[{std\+::string}]{data = {\ttfamily \char`\"{}\char`\"{}} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}

Override the protocol method to manage and control the session communications in your inherited session. If you do not override this method then the \hyperlink{classcore_1_1_session}{Session} default will process the \textquotesingle{}commands\textquotesingle{} added to the server object using the process\+Request method on the session input. 

Reimplemented in \hyperlink{classcore_1_1_t_l_s_session_a547c436ab69f75307f065eca8cfcd109}{core\+::\+T\+L\+S\+Session}, and \hyperlink{classcore_1_1_console_session_a830cc1e1e0c3fe3b066f0a9f7f469490}{core\+::\+Console\+Session}.

\mbox{\Hypertarget{classcore_1_1_session_af78d7caeea09924ee5227490c15aecfc}\label{classcore_1_1_session_af78d7caeea09924ee5227490c15aecfc}} 
\index{core\+::\+Session@{core\+::\+Session}!send@{send}}
\index{send@{send}!core\+::\+Session@{core\+::\+Session}}
\subsubsection{\texorpdfstring{send()}{send()}}
{\footnotesize\ttfamily void core\+::\+Session\+::send (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

The send method is used to output the contents of the out stream to the session containing the stream. \mbox{\Hypertarget{classcore_1_1_session_a0b1722c6abd693702ffd15a810844313}\label{classcore_1_1_session_a0b1722c6abd693702ffd15a810844313}} 
\index{core\+::\+Session@{core\+::\+Session}!send\+To\+All@{send\+To\+All}}
\index{send\+To\+All@{send\+To\+All}!core\+::\+Session@{core\+::\+Session}}
\subsubsection{\texorpdfstring{send\+To\+All()}{sendToAll()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void core\+::\+Session\+::send\+To\+All (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Use this send\+To\+All method to output the contents of the out stream to all the connections on the server excluding the sender session. \mbox{\Hypertarget{classcore_1_1_session_a17ff9ad6ccf3a0588b59820ba5ba60e4}\label{classcore_1_1_session_a17ff9ad6ccf3a0588b59820ba5ba60e4}} 
\index{core\+::\+Session@{core\+::\+Session}!send\+To\+All@{send\+To\+All}}
\index{send\+To\+All@{send\+To\+All}!core\+::\+Session@{core\+::\+Session}}
\subsubsection{\texorpdfstring{send\+To\+All()}{sendToAll()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void core\+::\+Session\+::send\+To\+All (\begin{DoxyParamCaption}\item[{\hyperlink{classcore_1_1_session_filter}{Session\+Filter}}]{filter }\end{DoxyParamCaption})}

Use this send\+To\+All method to output the contents of the out stream to all the connections on the server excluding the sender session and the entries identified by the passed in filter object. 

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
/home/bradarant/barant/\+Server\+Core/Session.\+h\item 
/home/bradarant/barant/\+Server\+Core/Session.\+cpp\end{DoxyCompactItemize}
