\hypertarget{class_b_m_a_session}{}\section{B\+M\+A\+Session Class Reference}
\label{class_b_m_a_session}\index{B\+M\+A\+Session@{B\+M\+A\+Session}}


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



Inheritance diagram for B\+M\+A\+Session\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=283pt]{class_b_m_a_session__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for B\+M\+A\+Session\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_b_m_a_session__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_b_m_a_session_ab83bcfe0f9681c9f132793df0ec9f7bc}\label{class_b_m_a_session_ab83bcfe0f9681c9f132793df0ec9f7bc}} 
{\bfseries B\+M\+A\+Session} (\hyperlink{class_b_m_a_e_poll}{B\+M\+A\+E\+Poll} \&e\+Poll, \hyperlink{class_b_m_a_t_c_p_server_socket}{B\+M\+A\+T\+C\+P\+Server\+Socket} \&server)
\item 
\mbox{\Hypertarget{class_b_m_a_session_ac44c5b12a9f7ca3b2aeffdb88e928417}\label{class_b_m_a_session_ac44c5b12a9f7ca3b2aeffdb88e928417}} 
virtual void {\bfseries init} ()
\item 
\mbox{\Hypertarget{class_b_m_a_session_a9fa21f44e619122edfab161a4ce2b2c3}\label{class_b_m_a_session_a9fa21f44e619122edfab161a4ce2b2c3}} 
virtual void {\bfseries output} (\hyperlink{class_b_m_a_session}{B\+M\+A\+Session} $\ast$session)
\item 
void \hyperlink{class_b_m_a_session_af8a24d95fd661d0d992b60d18fcd0f39}{send} ()
\item 
void \hyperlink{class_b_m_a_session_a094faf173070e84ccd9c8ae1bba46354}{send\+To\+All} ()
\item 
void \hyperlink{class_b_m_a_session_a0f016f295869394f54819594267d033f}{send\+To\+All} (\hyperlink{class_b_m_a_session_filter}{B\+M\+A\+Session\+Filter} $\ast$filter)
\item 
\mbox{\Hypertarget{class_b_m_a_session_a4c719e3e012b386602e9cfc681ce2be0}\label{class_b_m_a_session_a4c719e3e012b386602e9cfc681ce2be0}} 
\hyperlink{class_b_m_a_t_c_p_server_socket}{B\+M\+A\+T\+C\+P\+Server\+Socket} \& {\bfseries get\+Server} ()
\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_b_m_a_session_a283478c55b4cd3fd12f2bc77d4fd3df0}\label{class_b_m_a_session_a283478c55b4cd3fd12f2bc77d4fd3df0}} 
std\+::stringstream {\bfseries out}
\item 
\mbox{\Hypertarget{class_b_m_a_session_a94c73261a2bd0fda9527f702d3ddf29f}\label{class_b_m_a_session_a94c73261a2bd0fda9527f702d3ddf29f}} 
\hyperlink{class_b_m_a_t_c_p_server_socket}{B\+M\+A\+T\+C\+P\+Server\+Socket} \& {\bfseries server}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_b_m_a_session_a7e627773deafd5f38d05d57653385048}{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{class_b_m_a_session_a0d382f77e98c53e966119c2563cbfef5}{on\+Connected} () override
\begin{DoxyCompactList}\small\item\em Called when socket is open and ready to communicate. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_b_m_a_session_a6675f7c1408bbb7d4b8d93deb0d722de}\label{class_b_m_a_session_a6675f7c1408bbb7d4b8d93deb0d722de}} 
virtual void {\bfseries protocol} (std\+::string data)=0
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
\hyperlink{class_b_m_a_session}{B\+M\+A\+Session}

\hyperlink{class_b_m_a_session}{B\+M\+A\+Session} defines the nature of the interaction with the client and stores persistent data for a defined session. \hyperlink{class_b_m_a_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{class_b_m_a_session_a0d382f77e98c53e966119c2563cbfef5}\label{class_b_m_a_session_a0d382f77e98c53e966119c2563cbfef5}} 
\index{B\+M\+A\+Session@{B\+M\+A\+Session}!on\+Connected@{on\+Connected}}
\index{on\+Connected@{on\+Connected}!B\+M\+A\+Session@{B\+M\+A\+Session}}
\subsubsection{\texorpdfstring{on\+Connected()}{onConnected()}}
{\footnotesize\ttfamily void B\+M\+A\+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{class_b_m_a_socket_ac2206da05ab857ec64c5d4addb04a4bf}{B\+M\+A\+Socket}.

\mbox{\Hypertarget{class_b_m_a_session_a7e627773deafd5f38d05d57653385048}\label{class_b_m_a_session_a7e627773deafd5f38d05d57653385048}} 
\index{B\+M\+A\+Session@{B\+M\+A\+Session}!on\+Data\+Received@{on\+Data\+Received}}
\index{on\+Data\+Received@{on\+Data\+Received}!B\+M\+A\+Session@{B\+M\+A\+Session}}
\subsubsection{\texorpdfstring{on\+Data\+Received()}{onDataReceived()}}
{\footnotesize\ttfamily void B\+M\+A\+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{class_b_m_a_socket_ad77bf590a4d9807bd8f0a81667903f2e}{B\+M\+A\+Socket}.

\mbox{\Hypertarget{class_b_m_a_session_af8a24d95fd661d0d992b60d18fcd0f39}\label{class_b_m_a_session_af8a24d95fd661d0d992b60d18fcd0f39}} 
\index{B\+M\+A\+Session@{B\+M\+A\+Session}!send@{send}}
\index{send@{send}!B\+M\+A\+Session@{B\+M\+A\+Session}}
\subsubsection{\texorpdfstring{send()}{send()}}
{\footnotesize\ttfamily void B\+M\+A\+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{class_b_m_a_session_a094faf173070e84ccd9c8ae1bba46354}\label{class_b_m_a_session_a094faf173070e84ccd9c8ae1bba46354}} 
\index{B\+M\+A\+Session@{B\+M\+A\+Session}!send\+To\+All@{send\+To\+All}}
\index{send\+To\+All@{send\+To\+All}!B\+M\+A\+Session@{B\+M\+A\+Session}}
\subsubsection{\texorpdfstring{send\+To\+All()}{sendToAll()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void B\+M\+A\+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{class_b_m_a_session_a0f016f295869394f54819594267d033f}\label{class_b_m_a_session_a0f016f295869394f54819594267d033f}} 
\index{B\+M\+A\+Session@{B\+M\+A\+Session}!send\+To\+All@{send\+To\+All}}
\index{send\+To\+All@{send\+To\+All}!B\+M\+A\+Session@{B\+M\+A\+Session}}
\subsubsection{\texorpdfstring{send\+To\+All()}{sendToAll()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void B\+M\+A\+Session\+::send\+To\+All (\begin{DoxyParamCaption}\item[{\hyperlink{class_b_m_a_session_filter}{B\+M\+A\+Session\+Filter} $\ast$}]{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/barant/\+Development/\+B\+M\+A/server\+\_\+core/\+Server\+Core/B\+M\+A\+Session.\+h\item 
/home/barant/\+Development/\+B\+M\+A/server\+\_\+core/\+Server\+Core/B\+M\+A\+Session.\+cpp\end{DoxyCompactItemize}
