Sophie

Sophie

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

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>GNU CommonC++: ost::UnixStream Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_unix_stream.html">UnixStream</a></div>
<h1>ost::UnixStream Class Reference</h1><!-- doxytag: class="ost::UnixStream" --><!-- doxytag: inherits="ost::Socket" -->Unix streams are used to represent Unix domain client connections to a local server for accepting client connections.streamable Unix domain socket connection.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="unix_8h-source.html">unix.h</a>&gt;</code>
<p>
<p>Inheritance diagram for ost::UnixStream:
<p><center><img src="classost_1_1_unix_stream.png" usemap="#ost::UnixStream_map" border="0" alt=""></center>
<map name="ost::UnixStream_map">
<area href="classost_1_1_socket.html" alt="ost::Socket" shape="rect" coords="56,0,158,24">
<area href="classost_1_1_unix_session.html" alt="ost::UnixSession" shape="rect" coords="0,112,102,136">
<area href="classost_1_1unixstream.html" alt="ost::unixstream" shape="rect" coords="112,112,214,136">
</map>
<a href="classost_1_1_unix_stream-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#47aa1e84b6b30aaf685da37d1c33333d">UnixStream</a> (<a class="el" href="classost_1_1_unix_socket.html">UnixSocket</a> &amp;server, int size=512, bool throwflag=true, <a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> <a class="el" href="classost_1_1_unix_stream.html#e7ec25f34d873ef18fd64d8b0f02cf79">timeout</a>=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a Unix domain stream by accepting a connection from a bound Unix domain socket acting as a server.  <a href="#47aa1e84b6b30aaf685da37d1c33333d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#c3ab04484686582f0da458e445f8c54a">UnixStream</a> (const char *pathname, int size=512, bool throwflag=true, <a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> to=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a Unix domain stream by connecting to a Unix domain socket.  <a href="#c3ab04484686582f0da458e445f8c54a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#3a83e5c60400c15691e07cc1572f896e">setTimeout</a> (<a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> to)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the I/O operation timeout for socket I/O operations.  <a href="#3a83e5c60400c15691e07cc1572f896e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#85445b9696aef793efaf149ab4c0f17a">UnixStream</a> (const <a class="el" href="classost_1_1_unix_stream.html">UnixStream</a> &amp;source)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A copy constructor creates a new stream buffer.  <a href="#85445b9696aef793efaf149ab4c0f17a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#ca8dc404a29b1e82cda4668cf11a16f7">~UnixStream</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flush and empty all buffers, and then remove the allocated buffers.  <a href="#ca8dc404a29b1e82cda4668cf11a16f7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#fb5c9e8757dd646f31ebbc9317dc009c">sync</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flushes the stream input and output buffers, writes pending output.  <a href="#fb5c9e8757dd646f31ebbc9317dc009c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#c997ba048d1e2cfa30f2f73474571534">isPending</a> (<a class="el" href="classost_1_1_socket.html#c2fe3b8bf4dfc66c7df11dfa1ce4415c">Pending</a> pend, <a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> <a class="el" href="classost_1_1_unix_stream.html#e7ec25f34d873ef18fd64d8b0f02cf79">timeout</a>=TIMEOUT_INF)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the status of pending stream data.  <a href="#c997ba048d1e2cfa30f2f73474571534"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#47ee3a02e54d02259e2073f616b315b6">getBufferSize</a> (void) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the size of the current stream buffering used.  <a href="#47ee3a02e54d02259e2073f616b315b6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#d7716a7585a96013b5617737b3b6ad15">UnixStream</a> (bool throwflag=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The constructor required for "unixstream", a more C++ style version of the <a class="el" href="classost_1_1_t_c_p_stream.html">TCPStream</a> class.  <a href="#d7716a7585a96013b5617737b3b6ad15"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#61c6df3222ae19b4fcd3292355a40dad">allocate</a> (int size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to allocate the buffer space needed for iostream operations.  <a href="#61c6df3222ae19b4fcd3292355a40dad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#8e1d91df372138f19b184de24507cd7a">endStream</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to terminate the buffer space and cleanup the socket connection.  <a href="#8e1d91df372138f19b184de24507cd7a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#f3f6b4f669ea0e3dca087824101545ce">underflow</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This streambuf method is used to load the input buffer through the established unix domain socket connection.  <a href="#f3f6b4f669ea0e3dca087824101545ce"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#264a06acbe32b9af460f6c27fb7d9cf9">uflow</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This streambuf method is used for doing unbuffered reads through the established unix domain socket connection when in interactive mode.  <a href="#264a06acbe32b9af460f6c27fb7d9cf9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#f1da2e12a8f72df5210d9508e31da2b3">overflow</a> (int ch)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This streambuf method is used to write the output buffer through the established unix domain connection.  <a href="#f1da2e12a8f72df5210d9508e31da2b3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#3077c8e255acdf561438c31010e96fe1">connect</a> (const char *pathname, int size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a Unix domain stream by connecting to a Unix domain socket.  <a href="#3077c8e255acdf561438c31010e96fe1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::iostream *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#4995485ba6ee8cb82ea680b07bb7f4d5">unixstr</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used in derived classes to refer to the current object via it's iostream.  <a href="#4995485ba6ee8cb82ea680b07bb7f4d5"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#e7ec25f34d873ef18fd64d8b0f02cf79">timeout</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#f46a88a033dff67d8b606462ae3b82ca">bufsize</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#ae0c867b6f05f1acb04ddf264a80a0d4">gbuf</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_stream.html#9eb647ea64a38e48ab3f2bf850c8ca59">pbuf</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Unix streams are used to represent Unix domain client connections to a local server for accepting client connections.streamable Unix domain socket connection. 
<p>
The Unix stream is a C++ "stream" class, and can accept streaming of data to and from other C++ objects using the &lt;&lt; and &gt;&gt; operators.<p>
Unix Stream itself can be formed either by connecting to a bound network address of a Unix domain server, or can be created when "accepting" a network connection from a Unix domain server.<p>
<dl compact><dt><b>Author:</b></dt><dd>Alex Pavloff &lt;<a href="mailto:alex@pavloff.net">alex@pavloff.net</a>&gt; </dd></dl>

<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="d7716a7585a96013b5617737b3b6ad15"></a><!-- doxytag: member="ost::UnixStream::UnixStream" ref="d7716a7585a96013b5617737b3b6ad15" args="(bool throwflag=true)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ost::UnixStream::UnixStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>throwflag</em> = <code>true</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The constructor required for "unixstream", a more C++ style version of the <a class="el" href="classost_1_1_t_c_p_stream.html">TCPStream</a> class. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="47aa1e84b6b30aaf685da37d1c33333d"></a><!-- doxytag: member="ost::UnixStream::UnixStream" ref="47aa1e84b6b30aaf685da37d1c33333d" args="(UnixSocket &amp;server, int size=512, bool throwflag=true, timeout_t timeout=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ost::UnixStream::UnixStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_unix_socket.html">UnixSocket</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>server</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>size</em> = <code>512</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>throwflag</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>timeout</em> = <code>0</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a Unix domain stream by accepting a connection from a bound Unix domain socket acting as a server. 
<p>
This performs an "accept" call.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>server</em>&nbsp;</td><td>socket listening. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of streaming input and output buffers. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>throwflag</em>&nbsp;</td><td>flag to throw errors. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>for all operations. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="c3ab04484686582f0da458e445f8c54a"></a><!-- doxytag: member="ost::UnixStream::UnixStream" ref="c3ab04484686582f0da458e445f8c54a" args="(const char *pathname, int size=512, bool throwflag=true, timeout_t to=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ost::UnixStream::UnixStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>pathname</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>size</em> = <code>512</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>throwflag</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>to</em> = <code>0</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a Unix domain stream by connecting to a Unix domain socket. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pathname</em>&nbsp;</td><td>path to socket </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of streaming input and output buffers. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>throwflag</em>&nbsp;</td><td>flag to throw errors. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>to</em>&nbsp;</td><td>timeout for all operations. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="85445b9696aef793efaf149ab4c0f17a"></a><!-- doxytag: member="ost::UnixStream::UnixStream" ref="85445b9696aef793efaf149ab4c0f17a" args="(const UnixStream &amp;source)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ost::UnixStream::UnixStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_unix_stream.html">UnixStream</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>source</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
A copy constructor creates a new stream buffer. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>of copy. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ca8dc404a29b1e82cda4668cf11a16f7"></a><!-- doxytag: member="ost::UnixStream::~UnixStream" ref="ca8dc404a29b1e82cda4668cf11a16f7" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual ost::UnixStream::~UnixStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Flush and empty all buffers, and then remove the allocated buffers. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="61c6df3222ae19b4fcd3292355a40dad"></a><!-- doxytag: member="ost::UnixStream::allocate" ref="61c6df3222ae19b4fcd3292355a40dad" args="(int size)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void ost::UnixStream::allocate           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>size</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Used to allocate the buffer space needed for iostream operations. 
<p>
This function is called by the constructor.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of stream buffers from constructor. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="3077c8e255acdf561438c31010e96fe1"></a><!-- doxytag: member="ost::UnixStream::connect" ref="3077c8e255acdf561438c31010e96fe1" args="(const char *pathname, int size)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void ost::UnixStream::connect           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>pathname</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>size</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a Unix domain stream by connecting to a Unix domain socket. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pathname</em>&nbsp;</td><td>path to socket </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of streaming input and output buffers. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="8e1d91df372138f19b184de24507cd7a"></a><!-- doxytag: member="ost::UnixStream::endStream" ref="8e1d91df372138f19b184de24507cd7a" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void ost::UnixStream::endStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Used to terminate the buffer space and cleanup the socket connection. 
<p>
This fucntion is called by the destructor.     </td>
  </tr>
</table>
<a class="anchor" name="47ee3a02e54d02259e2073f616b315b6"></a><!-- doxytag: member="ost::UnixStream::getBufferSize" ref="47ee3a02e54d02259e2073f616b315b6" args="(void) const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int ost::UnixStream::getBufferSize           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the size of the current stream buffering used. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>size of stream buffers. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="c997ba048d1e2cfa30f2f73474571534"></a><!-- doxytag: member="ost::UnixStream::isPending" ref="c997ba048d1e2cfa30f2f73474571534" args="(Pending pend, timeout_t timeout=TIMEOUT_INF)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">bool ost::UnixStream::isPending           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_socket.html#c2fe3b8bf4dfc66c7df11dfa1ce4415c">Pending</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>pend</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>timeout</em> = <code>TIMEOUT_INF</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the status of pending stream data. 
<p>
This can be used to examine if input or output is waiting, or if an error or disconnect has occured on the stream. If a read buffer contains data then input is ready and if write buffer contains data it is first flushed and then checked.     </td>
  </tr>
</table>
<a class="anchor" name="f1da2e12a8f72df5210d9508e31da2b3"></a><!-- doxytag: member="ost::UnixStream::overflow" ref="f1da2e12a8f72df5210d9508e31da2b3" args="(int ch)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int ost::UnixStream::overflow           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ch</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This streambuf method is used to write the output buffer through the established unix domain connection. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ch</em>&nbsp;</td><td>char to push through. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>char pushed through. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="3a83e5c60400c15691e07cc1572f896e"></a><!-- doxytag: member="ost::UnixStream::setTimeout" ref="3a83e5c60400c15691e07cc1572f896e" args="(timeout_t to)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void ost::UnixStream::setTimeout           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>to</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the I/O operation timeout for socket I/O operations. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>to</em>&nbsp;</td><td>timeout to set. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="fb5c9e8757dd646f31ebbc9317dc009c"></a><!-- doxytag: member="ost::UnixStream::sync" ref="fb5c9e8757dd646f31ebbc9317dc009c" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int ost::UnixStream::sync           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Flushes the stream input and output buffers, writes pending output. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>0 on success. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="264a06acbe32b9af460f6c27fb7d9cf9"></a><!-- doxytag: member="ost::UnixStream::uflow" ref="264a06acbe32b9af460f6c27fb7d9cf9" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int ost::UnixStream::uflow           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This streambuf method is used for doing unbuffered reads through the established unix domain socket connection when in interactive mode. 
<p>
Also this method will handle proper use of buffers if not in interative mode.<p>
<dl compact><dt><b>Returns:</b></dt><dd>char from unix domain socket connection, EOF if not connected. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="f3f6b4f669ea0e3dca087824101545ce"></a><!-- doxytag: member="ost::UnixStream::underflow" ref="f3f6b4f669ea0e3dca087824101545ce" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual int ost::UnixStream::underflow           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This streambuf method is used to load the input buffer through the established unix domain socket connection. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>char from get buffer, EOF if not connected. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="4995485ba6ee8cb82ea680b07bb7f4d5"></a><!-- doxytag: member="ost::UnixStream::unixstr" ref="4995485ba6ee8cb82ea680b07bb7f4d5" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">std::iostream* ost::UnixStream::unixstr           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Used in derived classes to refer to the current object via it's iostream. 
<p>
For example, to send a set of characters in a derived method, one might use *tcp() &lt;&lt; "test".<p>
<dl compact><dt><b>Returns:</b></dt><dd>stream pointer of this object. </dd></dl>
    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="f46a88a033dff67d8b606462ae3b82ca"></a><!-- doxytag: member="ost::UnixStream::bufsize" ref="f46a88a033dff67d8b606462ae3b82ca" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int <a class="el" href="classost_1_1_unix_stream.html#f46a88a033dff67d8b606462ae3b82ca">ost::UnixStream::bufsize</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="ae0c867b6f05f1acb04ddf264a80a0d4"></a><!-- doxytag: member="ost::UnixStream::gbuf" ref="ae0c867b6f05f1acb04ddf264a80a0d4" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">char* <a class="el" href="classost_1_1_unix_stream.html#ae0c867b6f05f1acb04ddf264a80a0d4">ost::UnixStream::gbuf</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="9eb647ea64a38e48ab3f2bf850c8ca59"></a><!-- doxytag: member="ost::UnixStream::pbuf" ref="9eb647ea64a38e48ab3f2bf850c8ca59" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">char * <a class="el" href="classost_1_1_unix_stream.html#9eb647ea64a38e48ab3f2bf850c8ca59">ost::UnixStream::pbuf</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="e7ec25f34d873ef18fd64d8b0f02cf79"></a><!-- doxytag: member="ost::UnixStream::timeout" ref="e7ec25f34d873ef18fd64d8b0f02cf79" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> <a class="el" href="classost_1_1_unix_stream.html#e7ec25f34d873ef18fd64d8b0f02cf79">ost::UnixStream::timeout</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="unix_8h-source.html">unix.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 10:50:58 2006 for GNU CommonC++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>