Sophie

Sophie

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

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::UnixSocket 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_socket.html">UnixSocket</a></div>
<h1>ost::UnixSocket Class Reference</h1><!-- doxytag: class="ost::UnixSocket" --><!-- doxytag: inherits="ost::Socket" -->Unix domain sockets are used for stream based connected sessions between processes on the same machine.bound server for Unix domain streams and sessions.  
<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::UnixSocket:
<p><center><img src="classost_1_1_unix_socket.png" usemap="#ost::UnixSocket_map" border="0" alt=""></center>
<map name="ost::UnixSocket_map">
<area href="classost_1_1_socket.html" alt="ost::Socket" shape="rect" coords="0,0,96,24">
</map>
<a href="classost_1_1_unix_socket-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_socket.html#d247697df0e9595edda1811ce2cbda49">UnixSocket</a> (const char *pathname, int backlog=5)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A Unix domain "server" is created as a Unix domain socket that is bound to a pathname and that has a backlog queue to listen for connection requests.  <a href="#d247697df0e9595edda1811ce2cbda49"></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_socket.html#55ff7e3dd85b823c41070bcad8d8d4bf">isPendingConnection</a> (<a class="el" href="thread_8h.html#f412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=TIMEOUT_INF)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">not const -- jfc  <a href="#55ff7e3dd85b823c41070bcad8d8d4bf"></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_socket.html#130c4df2a9f65959eb3df4e92762941a">~UnixSocket</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Use base socket handler for ending this socket.  <a href="#130c4df2a9f65959eb3df4e92762941a"></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">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_socket.html#38e4a88a67d37e1c62594bb7c8d16041">close</a> (void)</td></tr>

<tr><td colspan="2"><br><h2>Protected Attributes</h2></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_socket.html#f38b52b046cfe425011e7a0f0ab900cd">path</a></td></tr>

<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_socket.html#9d8c3d489c258a33d9fc3fcf2d25e6d9">UnixStream</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_socket.html#9884a27b35e263e19e4acf2cb06c4071">SocketPort</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_unix_socket.html#d61d60ad260c2cbbd0e85b2616e19315">unixstream</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Unix domain sockets are used for stream based connected sessions between processes on the same machine.bound server for Unix domain streams and sessions. 
<p>
An implicit and unique <a class="el" href="classost_1_1_unix_socket.html">UnixSocket</a> object exists in Common C++ to represent a bound Unix domain socket acting as a "server" for receiving connection requests. This class is not part of <a class="el" href="classost_1_1_unix_stream.html">UnixStream</a> because such objects normally perform no physical I/O (read or write operations) other than to specify a listen backlog queue and perform "accept" operations for pending connections.<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="d247697df0e9595edda1811ce2cbda49"></a><!-- doxytag: member="ost::UnixSocket::UnixSocket" ref="d247697df0e9595edda1811ce2cbda49" args="(const char *pathname, int backlog=5)" --><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::UnixSocket::UnixSocket           </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>backlog</em> = <code>5</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>
A Unix domain "server" is created as a Unix domain socket that is bound to a pathname and that has a backlog queue to listen for connection requests. 
<p>
If the server cannot be created, an exception is thrown.<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>pathname to socket file </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>backlog</em>&nbsp;</td><td>size of connection request queue. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="130c4df2a9f65959eb3df4e92762941a"></a><!-- doxytag: member="ost::UnixSocket::~UnixSocket" ref="130c4df2a9f65959eb3df4e92762941a" 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::UnixSocket::~UnixSocket           </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>
Use base socket handler for ending this socket. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="38e4a88a67d37e1c62594bb7c8d16041"></a><!-- doxytag: member="ost::UnixSocket::close" ref="38e4a88a67d37e1c62594bb7c8d16041" 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::UnixSocket::close           </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>
    </td>
  </tr>
</table>
<a class="anchor" name="55ff7e3dd85b823c41070bcad8d8d4bf"></a><!-- doxytag: member="ost::UnixSocket::isPendingConnection" ref="55ff7e3dd85b823c41070bcad8d8d4bf" args="(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::UnixSocket::isPendingConnection           </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>timeout</em> = <code>TIMEOUT_INF</code>          </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>
not const -- jfc 
<p>
    </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="9884a27b35e263e19e4acf2cb06c4071"></a><!-- doxytag: member="ost::UnixSocket::SocketPort" ref="9884a27b35e263e19e4acf2cb06c4071" 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">friend class <a class="el" href="classost_1_1_socket_port.html">SocketPort</a><code> [friend]</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="d61d60ad260c2cbbd0e85b2616e19315"></a><!-- doxytag: member="ost::UnixSocket::unixstream" ref="d61d60ad260c2cbbd0e85b2616e19315" 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">friend class <a class="el" href="classost_1_1unixstream.html">unixstream</a><code> [friend]</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="9d8c3d489c258a33d9fc3fcf2d25e6d9"></a><!-- doxytag: member="ost::UnixSocket::UnixStream" ref="9d8c3d489c258a33d9fc3fcf2d25e6d9" 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">friend class <a class="el" href="classost_1_1_unix_stream.html">UnixStream</a><code> [friend]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="f38b52b046cfe425011e7a0f0ab900cd"></a><!-- doxytag: member="ost::UnixSocket::path" ref="f38b52b046cfe425011e7a0f0ab900cd" 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_socket.html#f38b52b046cfe425011e7a0f0ab900cd">ost::UnixSocket::path</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>