Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 68d373e54fb21da3730c08bede406633 > files > 636

libCommonC++1.9_3-devel-1.9.4-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ost::SocketPort class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.10 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>ost::SocketPort  Class Reference</h1>The socket port is an internal class which is attached to and then serviced by a specific <a class="el" href="classost_1_1_socket_service.html">SocketService</a> "object". base class for realtime and thread pool serviced protocols. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="socket_8h-source.html">socket.h</a>&gt;</code>
<p>
<p>Inheritance diagram for ost::SocketPort::
<p><center><img src="classost_1_1_socket_port.gif" usemap="#ost::SocketPort_map" border="0"></center>
<map name="ost::SocketPort_map">
<area href="classost_1_1_socket.html" alt="ost::Socket" shape="rect" coords="0,0,95,24">
<area href="classost_1_1_timer_port.html" alt="ost::TimerPort" shape="rect" coords="105,0,200,24">
</map>
<a href="classost_1_1_socket_port-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#a0">setTimer</a> (<a class="el" href="thread_8h.html#a11">timeout_t</a> timeout=0)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Derived setTimer to notify the service thread pool of change in expected timeout.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#a1">incTimer</a> (<a class="el" href="thread_8h.html#a11">timeout_t</a> timeout)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Derived incTimer to notify the service thread pool of a change in expected timeout.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b0">SocketPort</a> (<a class="el" href="classost_1_1_socket_service.html">SocketService</a> *svc, <a class="el" href="classost_1_1_t_c_p_socket.html">TCPSocket</a> &amp;tcp)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Construct an accepted TCP socket connection from a specific bound TCP server.</em> <a href="#b0">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b1">SocketPort</a> (<a class="el" href="classost_1_1_socket_service.html">SocketService</a> *svc, const <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> &amp;ia, <a class="el" href="namespaceost.html#a97">tpport_t</a> port)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Construct a bound UDP socket for use in deriving realtime UDP streaming protocols handled by thread pool objects.</em> <a href="#b1">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b2">Attach</a> (<a class="el" href="classost_1_1_socket_service.html">SocketService</a> *svc)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Attach yourself to the service pool thread object.</em> <a href="#b2">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b3">~SocketPort</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Disconnect the socket from the service thread pool and the remote connection.</em> <a href="#b3">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b4">setDetectPending</a> (bool)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Used to indicate if the service thread should monitor pending data for us.</em> <a href="#b4">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b5">getDetectPending</a> (void) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get the current state of the DetectPending flag.</em> <a href="#b5">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b6">setDetectOutput</a> (bool)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Used to indicate if output ready monitoring should be performed by the service thread.</em> <a href="#b6">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b7">getDetectOutput</a> (void) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get the current state of the DetectOutput flag.</em> <a href="#b7">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b8">Expired</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Called by the service thread pool when the objects timer has expired.</em> <a href="#b8">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b9">Pending</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Called by the service thread pool when input data is pending for this socket.</em> <a href="#b9">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b10">Output</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Called by the service thread pool when output data is pending for this socket.</em> <a href="#b10">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b11">Disconnect</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Called by the service thread pool when a disconnect has occured.</em> <a href="#b11">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="namespaceost.html#a94">sockerror_t</a>&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b12">Connect</a> (const <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> &amp;ia, <a class="el" href="namespaceost.html#a97">tpport_t</a> port)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Connect a <a class="el" href="classost_1_1_socket.html">Socket</a> Port to a known peer host.</em> <a href="#b12">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b13">Send</a> (const void *buf, int len)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Transmit "send" data to a connected peer host.</em> <a href="#b13">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b14">Recv</a> (void *buf, size_t len)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Receive a message from any host.</em> <a href="#b14">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#b15">Peek</a> (void *buf, size_t len)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Examine the content of the next packet.</em> <a href="#b15">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Friends</h2></td></tr>
<tr><td nowrap align=right valign=top>class&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_socket_port.html#l0">SocketService</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The socket port is an internal class which is attached to and then serviced by a specific <a class="el" href="classost_1_1_socket_service.html">SocketService</a> "object". base class for realtime and thread pool serviced protocols.
<p>
Derived versions of this class offer specific functionality for specific protocols. Both Common C++ supporting frameworks and application objects may be derived from related protocol specific base classes.
<p>
A special set of classes, "<a class="el" href="classost_1_1_socket_port.html">SocketPort</a>" and "<a class="el" href="classost_1_1_socket_service.html">SocketService</a>", exist for building realtime streaming media servers on top of UDP and TCP protocols. The "<a class="el" href="classost_1_1_socket_port.html">SocketPort</a>" is used to hold a connected or associated TCP or UDP socket which is being "streamed" and which offers callback methods that are invoked from a "<a class="el" href="classost_1_1_socket_service.html">SocketService</a>" thread. <a class="el" href="classost_1_1_socket_service.html">SocketService</a>'s can be pooled into logical thread pools that can service a group of SocketPorts. A millisecond accurate "timer" is associated with each <a class="el" href="classost_1_1_socket_port.html">SocketPort</a> and can be used to time synchronize <a class="el" href="classost_1_1_socket_port.html">SocketPort</a> I/O operations.
<p>
<dl compact><dt><b>
Author: </b><dd>
David Sugar &lt;<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>&gt; </dl>
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="b0" doxytag="ost::SocketPort::SocketPort"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> ost::SocketPort::SocketPort </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="classost_1_1_socket_service.html">SocketService</a> *</td>
          <td class="mdname">&nbsp; <em>svc</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="classost_1_1_t_c_p_socket.html">TCPSocket</a> &amp;</td>
          <td class="mdname">&nbsp; <em>tcp</em></td>
        </tr>
        <tr>
          <td></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>
Construct an accepted TCP socket connection from a specific bound TCP server.
<p>
This is meant to derive advanced application specific TCP servers that can be thread pooled.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>svc
</em>&nbsp;</td><td>
pool thread object. </td></tr>
<tr><td valign=top><em>tcp
</em>&nbsp;</td><td>
socket object to accept. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="b1" doxytag="ost::SocketPort::SocketPort"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> ost::SocketPort::SocketPort </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="classost_1_1_socket_service.html">SocketService</a> *</td>
          <td class="mdname">&nbsp; <em>svc</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">const <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> &amp;</td>
          <td class="mdname">&nbsp; <em>ia</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="namespaceost.html#a97">tpport_t</a></td>
          <td class="mdname">&nbsp; <em>port</em></td>
        </tr>
        <tr>
          <td></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>
Construct a bound UDP socket for use in deriving realtime UDP streaming protocols handled by thread pool objects.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>svc
</em>&nbsp;</td><td>
pool thread object. </td></tr>
<tr><td valign=top><em>ia
</em>&nbsp;</td><td>
address of interface to bind. </td></tr>
<tr><td valign=top><em>port
</em>&nbsp;</td><td>
number to bind to. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="b3" doxytag="ost::SocketPort::~SocketPort"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual ost::SocketPort::~SocketPort </td>
          <td class="md">(&nbsp;</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Disconnect the socket from the service thread pool and the remote connection.
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="b2" doxytag="ost::SocketPort::Attach"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void ost::SocketPort::Attach </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="classost_1_1_socket_service.html">SocketService</a> *</td>
          <td class="mdname1">&nbsp; <em>svc</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Attach yourself to the service pool thread object.
<p>
The later version.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>svc
</em>&nbsp;</td><td>
pool thread object </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="b12" doxytag="ost::SocketPort::Connect"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="namespaceost.html#a94">sockerror_t</a> ost::SocketPort::Connect </td>
          <td class="md">(&nbsp;</td>
          <td class="md">const <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> &amp;</td>
          <td class="mdname">&nbsp; <em>ia</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="namespaceost.html#a97">tpport_t</a></td>
          <td class="mdname">&nbsp; <em>port</em></td>
        </tr>
        <tr>
          <td></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>
Connect a <a class="el" href="classost_1_1_socket.html">Socket</a> Port to a known peer host.
<p>
This is normally used with the UDP constructor. This is also performed as a non-blocking operation under Posix systems to prevent delays in a callback handler.
<p>
<dl compact><dt><b>
Returns: </b><dd>
0 if successful. </dl><dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ia
</em>&nbsp;</td><td>
address of remote host or subnet. </td></tr>
<tr><td valign=top><em>port
</em>&nbsp;</td><td>
number of remote peer(s). </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="b11" doxytag="ost::SocketPort::Disconnect"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void ost::SocketPort::Disconnect </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline, protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called by the service thread pool when a disconnect has occured.
<p>
    </td>
  </tr>
</table>
<a name="b8" doxytag="ost::SocketPort::Expired"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void ost::SocketPort::Expired </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline, protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called by the service thread pool when the objects timer has expired.
<p>
Used for timed events.     </td>
  </tr>
</table>
<a name="b10" doxytag="ost::SocketPort::Output"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void ost::SocketPort::Output </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline, protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called by the service thread pool when output data is pending for this socket.
<p>
    </td>
  </tr>
</table>
<a name="b15" doxytag="ost::SocketPort::Peek"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int ost::SocketPort::Peek </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void *</td>
          <td class="mdname">&nbsp; <em>buf</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">size_t</td>
          <td class="mdname">&nbsp; <em>len</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Examine the content of the next packet.
<p>
This can be used to build "smart" line buffering for derived TCP classes.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>pointer
</em>&nbsp;</td><td>
to packet buffer to examine. </td></tr>
<tr><td valign=top><em>len
</em>&nbsp;</td><td>
of packet buffer to examine. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
number of bytes actually available. </dl>    </td>
  </tr>
</table>
<a name="b9" doxytag="ost::SocketPort::Pending"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void ost::SocketPort::Pending </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline, protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called by the service thread pool when input data is pending for this socket.
<p>
    </td>
  </tr>
</table>
<a name="b14" doxytag="ost::SocketPort::Recv"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int ost::SocketPort::Recv </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void *</td>
          <td class="mdname">&nbsp; <em>buf</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">size_t</td>
          <td class="mdname">&nbsp; <em>len</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Receive a message from any host.
<p>
This is used in derived classes to build protocols.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>pointer
</em>&nbsp;</td><td>
to packet buffer to receive. </td></tr>
<tr><td valign=top><em>len
</em>&nbsp;</td><td>
of packet buffer to receive. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
number of bytes received. </dl>    </td>
  </tr>
</table>
<a name="b13" doxytag="ost::SocketPort::Send"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int ost::SocketPort::Send </td>
          <td class="md">(&nbsp;</td>
          <td class="md">const void *</td>
          <td class="mdname">&nbsp; <em>buf</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">int</td>
          <td class="mdname">&nbsp; <em>len</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Transmit "send" data to a connected peer host.
<p>
This is not public by default since an overriding protocol is likely to be used in a derived class.
<p>
<dl compact><dt><b>
Returns: </b><dd>
number of bytes sent. </dl><dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>address
</em>&nbsp;</td><td>
of buffer to send. </td></tr>
<tr><td valign=top><em>len
</em>&nbsp;</td><td>
of bytes to send. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="b7" doxytag="ost::SocketPort::getDetectOutput"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool ost::SocketPort::getDetectOutput </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"> const<code> [inline, protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the current state of the DetectOutput flag.
<p>
    </td>
  </tr>
</table>
<a name="b5" doxytag="ost::SocketPort::getDetectPending"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool ost::SocketPort::getDetectPending </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"> const<code> [inline, protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the current state of the DetectPending flag.
<p>
    </td>
  </tr>
</table>
<a name="a1" doxytag="ost::SocketPort::incTimer"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void ost::SocketPort::incTimer </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="thread_8h.html#a11">timeout_t</a></td>
          <td class="mdname1">&nbsp; <em>timeout</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Derived incTimer to notify the service thread pool of a change in expected timeout.
<p>
This allows <a class="el" href="classost_1_1_socket_service.html">SocketService</a> to reschedule all timers. Otherwise same as <a class="el" href="classost_1_1_timer_port.html">TimerPort</a>.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>timeout
</em>&nbsp;</td><td>
in milliseconds. </td></tr>
</table>
</dl>
<p>
Reimplemented from <a class="el" href="classost_1_1_timer_port.html#a2">ost::TimerPort</a>.    </td>
  </tr>
</table>
<a name="b6" doxytag="ost::SocketPort::setDetectOutput"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void ost::SocketPort::setDetectOutput </td>
          <td class="md">(&nbsp;</td>
          <td class="md">bool</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Used to indicate if output ready monitoring should be performed by the service thread.
<p>
    </td>
  </tr>
</table>
<a name="b4" doxytag="ost::SocketPort::setDetectPending"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void ost::SocketPort::setDetectPending </td>
          <td class="md">(&nbsp;</td>
          <td class="md">bool</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Used to indicate if the service thread should monitor pending data for us.
<p>
    </td>
  </tr>
</table>
<a name="a0" doxytag="ost::SocketPort::setTimer"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void ost::SocketPort::setTimer </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="thread_8h.html#a11">timeout_t</a></td>
          <td class="mdname1">&nbsp; <em>timeout</em> = 0          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Derived setTimer to notify the service thread pool of change in expected timeout.
<p>
This allows <a class="el" href="classost_1_1_socket_service.html">SocketService</a> to  reschedule all timers. Otherwise same as <a class="el" href="classost_1_1_timer_port.html">TimerPort</a>.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>timeout
</em>&nbsp;</td><td>
in milliseconds. </td></tr>
</table>
</dl>
<p>
Reimplemented from <a class="el" href="classost_1_1_timer_port.html#a1">ost::TimerPort</a>.    </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a name="l0" doxytag="ost::SocketPort::SocketService"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> friend class SocketService<code> [friend]</code>
      </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="socket_8h-source.html">socket.h</a></ul>
<hr><address><small>Generated at Fri Jan 4 18:51:51 2002 for CommonC++ by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.10 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
 &copy;&nbsp;1997-2001</small></address>
</body>
</html>