Sophie

Sophie

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

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

\section{ost::unixstream Class Reference}
\label{classost_1_1unixstream}\index{ost::unixstream@{ost::unixstream}}
A more natural C++ \char`\"{}unixstream\char`\"{} class for use by non-threaded applications.C++ \char`\"{}fstream\char`\"{} style unixstream class.  


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

Inheritance diagram for ost::unixstream::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classost_1_1unixstream}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf unixstream} ()
\begin{CompactList}\small\item\em Construct an unopened \char`\"{}tcpstream\char`\"{} object. \item\end{CompactList}\item 
{\bf unixstream} (const char $\ast$pathname, int buffer=512)
\begin{CompactList}\small\item\em Construct and \char`\"{}open\char`\"{} (connect) the tcp stream to a remote socket. \item\end{CompactList}\item 
{\bf unixstream} ({\bf Unix\-Socket} \&unixsock, int buffer=512)
\begin{CompactList}\small\item\em Construct and \char`\"{}accept\char`\"{} (connect) the tcp stream through a server. \item\end{CompactList}\item 
void {\bf open} (const char $\ast$pathname, int buffer=512)
\begin{CompactList}\small\item\em Open a tcp stream connection. \item\end{CompactList}\item 
void {\bf open} ({\bf Unix\-Socket} \&unixsock, int buffer=512)
\begin{CompactList}\small\item\em Open a tcp stream connection by accepting a tcp socket. \item\end{CompactList}\item 
void {\bf close} (void)
\begin{CompactList}\small\item\em Close the active tcp stream connection. \item\end{CompactList}\item 
bool {\bf operator!} () const 
\begin{CompactList}\small\item\em Test to see if stream is open. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
A more natural C++ \char`\"{}unixstream\char`\"{} class for use by non-threaded applications.C++ \char`\"{}fstream\char`\"{} style unixstream class. 

This class behaves a lot more like fstream and similar classes.

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




\subsection{Constructor \& Destructor Documentation}
\index{ost::unixstream@{ost::unixstream}!unixstream@{unixstream}}
\index{unixstream@{unixstream}!ost::unixstream@{ost::unixstream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::unixstream::unixstream ()}\label{classost_1_1unixstream_19250bd6a03d44a24acbb72b395e733c}


Construct an unopened \char`\"{}tcpstream\char`\"{} object. 

\index{ost::unixstream@{ost::unixstream}!unixstream@{unixstream}}
\index{unixstream@{unixstream}!ost::unixstream@{ost::unixstream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::unixstream::unixstream (const char $\ast$ {\em pathname}, int {\em buffer} = {\tt 512})}\label{classost_1_1unixstream_e9622b71dd27a2e7758e67ae170f7045}


Construct and \char`\"{}open\char`\"{} (connect) the tcp stream to a remote socket. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pathname}]pathname to socket file \item[{\em buffer}]size for streaming (optional). \end{description}
\end{Desc}
\index{ost::unixstream@{ost::unixstream}!unixstream@{unixstream}}
\index{unixstream@{unixstream}!ost::unixstream@{ost::unixstream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::unixstream::unixstream ({\bf Unix\-Socket} \& {\em unixsock}, int {\em buffer} = {\tt 512})}\label{classost_1_1unixstream_11812e2a114c71c8046f29ba6346ca89}


Construct and \char`\"{}accept\char`\"{} (connect) the tcp stream through a server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em unixsock}]socket to accept from. \item[{\em buffer}]size for streaming (optional). \end{description}
\end{Desc}


\subsection{Member Function Documentation}
\index{ost::unixstream@{ost::unixstream}!close@{close}}
\index{close@{close}!ost::unixstream@{ost::unixstream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::unixstream::close (void)}\label{classost_1_1unixstream_c5170d735329b96a75afa7e5164c4340}


Close the active tcp stream connection. 

\index{ost::unixstream@{ost::unixstream}!open@{open}}
\index{open@{open}!ost::unixstream@{ost::unixstream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::unixstream::open ({\bf Unix\-Socket} \& {\em unixsock}, int {\em buffer} = {\tt 512})}\label{classost_1_1unixstream_2c7e711ac75c5e8b4d9e751c6b3657a4}


Open a tcp stream connection by accepting a tcp socket. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em unixsock}]socket to accept from. \item[{\em buffer}]size for streaming (optional) \end{description}
\end{Desc}
\index{ost::unixstream@{ost::unixstream}!open@{open}}
\index{open@{open}!ost::unixstream@{ost::unixstream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::unixstream::open (const char $\ast$ {\em pathname}, int {\em buffer} = {\tt 512})\hspace{0.3cm}{\tt  [inline]}}\label{classost_1_1unixstream_36912330fc233b99b6ea5d6a64a8c5f8}


Open a tcp stream connection. 

This will close the currently active connection first.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pathname}]pathname to socket file \item[{\em buffer}]size for streaming (optional) \end{description}
\end{Desc}
\index{ost::unixstream@{ost::unixstream}!operator"!@{operator"!}}
\index{operator"!@{operator"!}!ost::unixstream@{ost::unixstream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::unixstream::operator! () const}\label{classost_1_1unixstream_e2fd7abfaf4da197090ba24f42fa255d}


Test to see if stream is open. 



Reimplemented from {\bf ost::Socket} {\rm (p.\,\pageref{classost_1_1_socket_5e2c05b34bded0db1bcdcf08bd44f052})}.

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