Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > ad1ba1135a9c9eeffc2e538163e00373 > files > 810

libCommonC++2_1.4-devel-1.4.1-1mdv2007.0.i586.rpm

\section{ost::Unix\-Socket Class Reference}
\label{classost_1_1_unix_socket}\index{ost::UnixSocket@{ost::UnixSocket}}
Unix domain sockets are used for stream based connected sessions between processes on the same machine.bound server for Unix domain streams and sessions.  


{\tt \#include $<$unix.h$>$}

Inheritance diagram for ost::Unix\-Socket::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classost_1_1_unix_socket}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Unix\-Socket} (const char $\ast$pathname, int backlog=5)
\begin{CompactList}\small\item\em A Unix domain \char`\"{}server\char`\"{} is created as a Unix domain socket that is bound to a pathname and that has a backlog queue to listen for connection requests. \item\end{CompactList}\item 
bool {\bf is\-Pending\-Connection} ({\bf timeout\_\-t} timeout=TIMEOUT\_\-INF)
\begin{CompactList}\small\item\em not const -- jfc \item\end{CompactList}\item 
virtual {\bf $\sim$Unix\-Socket} ()
\begin{CompactList}\small\item\em Use base socket handler for ending this socket. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf close} (void)
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
char $\ast$ {\bf path}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Unix\-Stream}
\item 
class {\bf Socket\-Port}
\item 
class {\bf unixstream}
\end{CompactItemize}


\subsection{Detailed Description}
Unix domain sockets are used for stream based connected sessions between processes on the same machine.bound server for Unix domain streams and sessions. 

An implicit and unique {\bf Unix\-Socket}{\rm (p.\,\pageref{classost_1_1_unix_socket})} object exists in Common C++ to represent a bound Unix domain socket acting as a \char`\"{}server\char`\"{} for receiving connection requests. This class is not part of {\bf Unix\-Stream}{\rm (p.\,\pageref{classost_1_1_unix_stream})} because such objects normally perform no physical I/O (read or write operations) other than to specify a listen backlog queue and perform \char`\"{}accept\char`\"{} operations for pending connections.

\begin{Desc}
\item[Author:]Alex Pavloff $<${\tt alex@pavloff.net}$>$ \end{Desc}




\subsection{Constructor \& Destructor Documentation}
\index{ost::UnixSocket@{ost::Unix\-Socket}!UnixSocket@{UnixSocket}}
\index{UnixSocket@{UnixSocket}!ost::UnixSocket@{ost::Unix\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Unix\-Socket::Unix\-Socket (const char $\ast$ {\em pathname}, int {\em backlog} = {\tt 5})}\label{classost_1_1_unix_socket_d247697df0e9595edda1811ce2cbda49}


A Unix domain \char`\"{}server\char`\"{} is created as a Unix domain socket that is bound to a pathname and that has a backlog queue to listen for connection requests. 

If the server cannot be created, an exception is thrown.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pathname}]pathname to socket file \item[{\em backlog}]size of connection request queue. \end{description}
\end{Desc}
\index{ost::UnixSocket@{ost::Unix\-Socket}!~UnixSocket@{$\sim$UnixSocket}}
\index{~UnixSocket@{$\sim$UnixSocket}!ost::UnixSocket@{ost::Unix\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual ost::Unix\-Socket::$\sim$Unix\-Socket ()\hspace{0.3cm}{\tt  [virtual]}}\label{classost_1_1_unix_socket_130c4df2a9f65959eb3df4e92762941a}


Use base socket handler for ending this socket. 



\subsection{Member Function Documentation}
\index{ost::UnixSocket@{ost::Unix\-Socket}!close@{close}}
\index{close@{close}!ost::UnixSocket@{ost::Unix\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Unix\-Socket::close (void)\hspace{0.3cm}{\tt  [protected]}}\label{classost_1_1_unix_socket_38e4a88a67d37e1c62594bb7c8d16041}


\index{ost::UnixSocket@{ost::Unix\-Socket}!isPendingConnection@{isPendingConnection}}
\index{isPendingConnection@{isPendingConnection}!ost::UnixSocket@{ost::Unix\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Unix\-Socket::is\-Pending\-Connection ({\bf timeout\_\-t} {\em timeout} = {\tt TIMEOUT\_\-INF})\hspace{0.3cm}{\tt  [inline]}}\label{classost_1_1_unix_socket_55ff7e3dd85b823c41070bcad8d8d4bf}


not const -- jfc 



\subsection{Friends And Related Function Documentation}
\index{ost::UnixSocket@{ost::Unix\-Socket}!SocketPort@{SocketPort}}
\index{SocketPort@{SocketPort}!ost::UnixSocket@{ost::Unix\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}friend class {\bf Socket\-Port}\hspace{0.3cm}{\tt  [friend]}}\label{classost_1_1_unix_socket_9884a27b35e263e19e4acf2cb06c4071}


\index{ost::UnixSocket@{ost::Unix\-Socket}!unixstream@{unixstream}}
\index{unixstream@{unixstream}!ost::UnixSocket@{ost::Unix\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}friend class {\bf unixstream}\hspace{0.3cm}{\tt  [friend]}}\label{classost_1_1_unix_socket_d61d60ad260c2cbbd0e85b2616e19315}


\index{ost::UnixSocket@{ost::Unix\-Socket}!UnixStream@{UnixStream}}
\index{UnixStream@{UnixStream}!ost::UnixSocket@{ost::Unix\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}friend class {\bf Unix\-Stream}\hspace{0.3cm}{\tt  [friend]}}\label{classost_1_1_unix_socket_9d8c3d489c258a33d9fc3fcf2d25e6d9}




\subsection{Member Data Documentation}
\index{ost::UnixSocket@{ost::Unix\-Socket}!path@{path}}
\index{path@{path}!ost::UnixSocket@{ost::Unix\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ {\bf ost::Unix\-Socket::path}\hspace{0.3cm}{\tt  [protected]}}\label{classost_1_1_unix_socket_f38b52b046cfe425011e7a0f0ab900cd}




The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
{\bf unix.h}\end{CompactItemize}