\hypertarget{classcore_1_1_t_c_p_server_socket}{}\section{core\+:\+:T\+C\+P\+Server\+Socket Class Reference}
\label{classcore_1_1_t_c_p_server_socket}\index{core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}}


{\ttfamily \#include $<$T\+C\+P\+Server\+Socket.\+h$>$}



Inheritance diagram for core\+:\+:T\+C\+P\+Server\+Socket\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=324pt]{classcore_1_1_t_c_p_server_socket__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for core\+:\+:T\+C\+P\+Server\+Socket\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classcore_1_1_t_c_p_server_socket__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classcore_1_1_t_c_p_server_socket_a141f91e2a1d4b348204e99688976d08e}{T\+C\+P\+Server\+Socket} (\hyperlink{classcore_1_1_e_poll}{E\+Poll} \&e\+Poll, \hyperlink{classcore_1_1_service}{Service} \&\hyperlink{classcore_1_1_t_c_p_server_socket_a6506607f9b55337ed3ecaffe226cd099}{service}, \hyperlink{classcore_1_1_i_p_address}{I\+P\+Address} address)
\item 
\hyperlink{classcore_1_1_t_c_p_server_socket_aa2b1403757821701ff411662a3e04ab5}{$\sim$\+T\+C\+P\+Server\+Socket} ()
\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classcore_1_1_service}{Service} \& \hyperlink{classcore_1_1_t_c_p_server_socket_a6506607f9b55337ed3ecaffe226cd099}{service}
\item 
\hyperlink{classcore_1_1_i_p_address_list}{I\+P\+Address\+List} $\ast$ \hyperlink{classcore_1_1_t_c_p_server_socket_a7d15f14da22cfd2421cf5f74d7401b63}{black\+List}
\item 
\hyperlink{classcore_1_1_i_p_address_list}{I\+P\+Address\+List} $\ast$ \hyperlink{classcore_1_1_t_c_p_server_socket_a93b82e8956e89ae8e39d97a81ebc65d7}{white\+List}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classcore_1_1_t_c_p_server_socket_ab6654ac0712442fd860ec26c70bde8aa}{on\+Data\+Received} (std\+::string data) override
\item 
int \hyperlink{classcore_1_1_t_c_p_server_socket_a0433eea0645d32bb3d28e1ed782a6bdb}{process\+Command} (std\+::string command, \hyperlink{classcore_1_1_session}{Session} $\ast$session, std\+::stringstream \&data) override
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
\hyperlink{classcore_1_1_t_c_p_server_socket}{T\+C\+P\+Server\+Socket}

Manage a socket connection as a T\+CP server type. Connections to the socket are processed through the accept functionality.

A list of connections is maintained in a vector object.

This object extends the B\+M\+A\+Command object as well so it can be added to a Console object and process commands to display status information. 

\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classcore_1_1_t_c_p_server_socket_a141f91e2a1d4b348204e99688976d08e}\label{classcore_1_1_t_c_p_server_socket_a141f91e2a1d4b348204e99688976d08e}} 
\index{core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}!T\+C\+P\+Server\+Socket@{T\+C\+P\+Server\+Socket}}
\index{T\+C\+P\+Server\+Socket@{T\+C\+P\+Server\+Socket}!core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}}
\subsubsection{\texorpdfstring{T\+C\+P\+Server\+Socket()}{TCPServerSocket()}}
{\footnotesize\ttfamily core\+::\+T\+C\+P\+Server\+Socket\+::\+T\+C\+P\+Server\+Socket (\begin{DoxyParamCaption}\item[{\hyperlink{classcore_1_1_e_poll}{E\+Poll} \&}]{e\+Poll,  }\item[{\hyperlink{classcore_1_1_service}{Service} \&}]{service,  }\item[{\hyperlink{classcore_1_1_i_p_address}{I\+P\+Address}}]{address }\end{DoxyParamCaption})}

The constructor for the B\+M\+A\+T\+C\+P\+Socket object.


\begin{DoxyParams}{Parameters}
{\em e\+Poll} & the \hyperlink{classcore_1_1_e_poll}{E\+Poll} instance that manages the socket. \\
\hline
{\em url} & the IP address for the socket to receive connection requests. \\
\hline
{\em port} & the port number that the socket will listen on. \\
\hline
{\em command\+Name} & the name of the command used to invoke the status display for this object. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the instance of the B\+M\+A\+T\+C\+P\+Server\+Socket. 
\end{DoxyReturn}
\mbox{\Hypertarget{classcore_1_1_t_c_p_server_socket_aa2b1403757821701ff411662a3e04ab5}\label{classcore_1_1_t_c_p_server_socket_aa2b1403757821701ff411662a3e04ab5}} 
\index{core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}!````~T\+C\+P\+Server\+Socket@{$\sim$\+T\+C\+P\+Server\+Socket}}
\index{````~T\+C\+P\+Server\+Socket@{$\sim$\+T\+C\+P\+Server\+Socket}!core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}}
\subsubsection{\texorpdfstring{$\sim$\+T\+C\+P\+Server\+Socket()}{~TCPServerSocket()}}
{\footnotesize\ttfamily core\+::\+T\+C\+P\+Server\+Socket\+::$\sim$\+T\+C\+P\+Server\+Socket (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

The destructor for this object. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{classcore_1_1_t_c_p_server_socket_ab6654ac0712442fd860ec26c70bde8aa}\label{classcore_1_1_t_c_p_server_socket_ab6654ac0712442fd860ec26c70bde8aa}} 
\index{core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}!on\+Data\+Received@{on\+Data\+Received}}
\index{on\+Data\+Received@{on\+Data\+Received}!core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}}
\subsubsection{\texorpdfstring{on\+Data\+Received()}{onDataReceived()}}
{\footnotesize\ttfamily void core\+::\+T\+C\+P\+Server\+Socket\+::on\+Data\+Received (\begin{DoxyParamCaption}\item[{std\+::string}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [protected]}, {\ttfamily [virtual]}}

Override the virtual data\+Received since for the server these are requests to accept the new connection socket. No data is to be read or written when this method is called. It is the response to the fact that a new connection is coming into the system


\begin{DoxyParams}{Parameters}
{\em data} & the pointer to the buffer containing the received data. \\
\hline
{\em length} & the length of the associated data buffer. \\
\hline
\end{DoxyParams}


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

\mbox{\Hypertarget{classcore_1_1_t_c_p_server_socket_a0433eea0645d32bb3d28e1ed782a6bdb}\label{classcore_1_1_t_c_p_server_socket_a0433eea0645d32bb3d28e1ed782a6bdb}} 
\index{core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}!process\+Command@{process\+Command}}
\index{process\+Command@{process\+Command}!core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}}
\subsubsection{\texorpdfstring{process\+Command()}{processCommand()}}
{\footnotesize\ttfamily int core\+::\+T\+C\+P\+Server\+Socket\+::process\+Command (\begin{DoxyParamCaption}\item[{std\+::string}]{command,  }\item[{\hyperlink{classcore_1_1_session}{Session} $\ast$}]{session,  }\item[{std\+::stringstream \&}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [protected]}, {\ttfamily [virtual]}}

This method is called when the \hyperlink{classcore_1_1_command}{Command} associated with this object is requested because a user has typed in the associated command name on a command entry line.


\begin{DoxyParams}{Parameters}
{\em the} & session object to write the output to. \\
\hline
\end{DoxyParams}


Reimplemented from \hyperlink{classcore_1_1_command_ab4a70ec0e419038d9cb2ea14573b7bb6}{core\+::\+Command}.



\subsection{Member Data Documentation}
\mbox{\Hypertarget{classcore_1_1_t_c_p_server_socket_a7d15f14da22cfd2421cf5f74d7401b63}\label{classcore_1_1_t_c_p_server_socket_a7d15f14da22cfd2421cf5f74d7401b63}} 
\index{core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}!black\+List@{black\+List}}
\index{black\+List@{black\+List}!core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}}
\subsubsection{\texorpdfstring{black\+List}{blackList}}
{\footnotesize\ttfamily \hyperlink{classcore_1_1_i_p_address_list}{I\+P\+Address\+List}$\ast$ core\+::\+T\+C\+P\+Server\+Socket\+::black\+List}

If not N\+U\+LL the blacklist object can be assigned to this server socket and the server IP addresses connecting to the server attempting to accept a socket are contained in this list then the connection is rejected and no accept is granted. \mbox{\Hypertarget{classcore_1_1_t_c_p_server_socket_a6506607f9b55337ed3ecaffe226cd099}\label{classcore_1_1_t_c_p_server_socket_a6506607f9b55337ed3ecaffe226cd099}} 
\index{core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}!service@{service}}
\index{service@{service}!core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}}
\subsubsection{\texorpdfstring{service}{service}}
{\footnotesize\ttfamily \hyperlink{classcore_1_1_service}{Service}\& core\+::\+T\+C\+P\+Server\+Socket\+::service}

The service object reference used to access associated server information such as sessions and other extended managers. \mbox{\Hypertarget{classcore_1_1_t_c_p_server_socket_a93b82e8956e89ae8e39d97a81ebc65d7}\label{classcore_1_1_t_c_p_server_socket_a93b82e8956e89ae8e39d97a81ebc65d7}} 
\index{core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}!white\+List@{white\+List}}
\index{white\+List@{white\+List}!core\+::\+T\+C\+P\+Server\+Socket@{core\+::\+T\+C\+P\+Server\+Socket}}
\subsubsection{\texorpdfstring{white\+List}{whiteList}}
{\footnotesize\ttfamily \hyperlink{classcore_1_1_i_p_address_list}{I\+P\+Address\+List}$\ast$ core\+::\+T\+C\+P\+Server\+Socket\+::white\+List}

If not N\+U\+LL the blacklist object can be assigned to this server socket and the server IP addresses connecting to the server attempting to accept a socket are contained in this list then the connection is rejected and no accept is granted. 

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