Sophie

Sophie

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

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::TCPStream 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::TCPStream  Class Reference</h1>TCP streams are used to represent TCP client connections to a server by TCP protocol servers for accepting client connections. streamable TCP socket connection. 
<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::TCPStream::
<p><center><img src="classost_1_1_t_c_p_stream.gif" usemap="#ost::TCPStream_map" border="0"></center>
<map name="ost::TCPStream_map">
<area href="classost_1_1_socket.html" alt="ost::Socket" shape="rect" coords="0,0,102,24">
<area href="classstd_1_1streambuf.html" alt="std::streambuf" shape="rect" coords="112,0,214,24">
<area href="classstd_1_1iostream.html" alt="std::iostream" shape="rect" coords="224,0,326,24">
<area href="classost_1_1_t_c_p_session.html" alt="ost::TCPSession" shape="rect" coords="0,112,102,136">
<area href="classost_1_1tcpstream.html" alt="ost::tcpstream" shape="rect" coords="112,112,214,136">
<area href="classost_1_1_u_r_l_stream.html" alt="ost::URLStream" shape="rect" coords="224,112,326,136">
</map>
<a href="classost_1_1_t_c_p_stream-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>&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_t_c_p_stream.html#a0">TCPStream</a> (<a class="el" href="classost_1_1_t_c_p_socket.html">TCPSocket</a> &amp;server, int size=512, bool throwflag=true, <a class="el" href="thread_8h.html#a11">timeout_t</a> <a class="el" href="classost_1_1_t_c_p_stream.html#n0">timeout</a>=0)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Create a TCP stream by accepting a connection from a bound TCP socket acting as a server.</em> <a href="#a0">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_t_c_p_stream.html#a1">TCPStream</a> (const <a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a> &amp;host, <a class="el" href="namespaceost.html#a97">tpport_t</a> port, int size=512, bool throwflag=true, <a class="el" href="thread_8h.html#a11">timeout_t</a> to=0)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Create a TCP stream by connecting to a TCP socket (on a remote machine).</em> <a href="#a1">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_t_c_p_stream.html#a2">setTimeout</a> (<a class="el" href="thread_8h.html#a11">timeout_t</a> to)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Set the I/O operation timeout for socket I/O operations.</em> <a href="#a2">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_t_c_p_stream.html#a3">TCPStream</a> (const TCPStream &amp;source)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>A copy constructor creates a new stream buffer.</em> <a href="#a3">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_t_c_p_stream.html#a4">~TCPStream</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Flush and empty all buffers, and then remove the allocated buffers.</em> <a href="#a4">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_t_c_p_stream.html#a5">sync</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Flushes the stream input and output buffers, writes pending output.</em> <a href="#a5">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_t_c_p_stream.html#a6">isPending</a> (<a class="el" href="namespaceost.html#a96">sockpend_t</a> pend, <a class="el" href="thread_8h.html#a11">timeout_t</a> <a class="el" href="classost_1_1_t_c_p_stream.html#n0">timeout</a>=TIMEOUT_INF)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get the status of pending stream data.</em> <a href="#a6">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_t_c_p_stream.html#a7">getBufferSize</a> (void) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Return the size of the current stream buffering used.</em> <a href="#a7">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_t_c_p_stream.html#b0">TCPStream</a> (bool throwflag=true)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>The constructor required for "<a class="el" href="classost_1_1tcpstream.html">tcpstream</a>", a more C++ style version of the <a class="el" href="classost_1_1_t_c_p_stream.html">TCPStream</a> class.</em> <a href="#b0">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_t_c_p_stream.html#b1">Allocate</a> (int size)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Used to allocate the buffer space needed for iostream operations.</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_t_c_p_stream.html#b2">endStream</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Used to terminate the buffer space and cleanup the socket connection.</em> <a href="#b2">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_t_c_p_stream.html#b3">underflow</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>This streambuf method is used to load the input buffer through the established tcp socket connection.</em> <a href="#b3">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_t_c_p_stream.html#b4">uflow</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>This streambuf method is used for doing unbuffered reads through the establish tcp socket connection when in interactive mode.</em> <a href="#b4">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_t_c_p_stream.html#b5">overflow</a> (int ch)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>This streambuf method is used to write the output buffer through the established tcp connection.</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_t_c_p_stream.html#b6">Connect</a> (const <a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a> &amp;host, <a class="el" href="namespaceost.html#a97">tpport_t</a> port, int size)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Create a TCP stream by connecting to a TCP socket (on a remote machine).</em> <a href="#b6">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classstd_1_1iostream.html">std::iostream</a> *&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_t_c_p_stream.html#b7">tcp</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Used in derived classes to refer to the current object via it's iostream.</em> <a href="#b7">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="thread_8h.html#a11">timeout_t</a>&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_t_c_p_stream.html#n0">timeout</a></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_t_c_p_stream.html#n1">bufsize</a></td></tr>
<tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_t_c_p_stream.html#n2">gbuf</a></td></tr>
<tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_t_c_p_stream.html#n3">pbuf</a></td></tr>
<tr><td colspan=2><br><h2>Friends</h2></td></tr>
<tr><td nowrap align=right valign=top>TCPStream &amp;&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_t_c_p_stream.html#l0">crlf</a> (TCPStream &amp;)</td></tr>
<tr><td nowrap align=right valign=top>TCPStream &amp;&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_t_c_p_stream.html#l1">lfcr</a> (TCPStream &amp;)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
TCP streams are used to represent TCP client connections to a server by TCP protocol servers for accepting client connections. streamable TCP socket connection.
<p>
The TCP 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>
<a class="el" href="classost_1_1_t_c_p_stream.html">TCPStream</a> itself can be formed either by connecting to a bound network address of a TCP server, or can be created when "accepting" a network connection from a TCP server.
<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::TCPStream::TCPStream"></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::TCPStream::TCPStream </td>
          <td class="md">(&nbsp;</td>
          <td class="md">bool</td>
          <td class="mdname1">&nbsp; <em>throwflag</em> = true          </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>
The constructor required for "<a class="el" href="classost_1_1tcpstream.html">tcpstream</a>", 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 name="a0" doxytag="ost::TCPStream::TCPStream"></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::TCPStream::TCPStream </td>
          <td class="md">(&nbsp;</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>server</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">int</td>
          <td class="mdname">&nbsp; <em>size</em> = 512, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">bool</td>
          <td class="mdname">&nbsp; <em>throwflag</em> = true, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="thread_8h.html#a11">timeout_t</a></td>
          <td class="mdname">&nbsp; <em>timeout</em> = 0</td>
        </tr>
        <tr>
          <td></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 TCP stream by accepting a connection from a bound TCP socket acting as a server.
<p>
This performs an "accept" call.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>size
</em>&nbsp;</td><td>
of streaming input and output buffers. </td></tr>
<tr><td valign=top><em>flag
</em>&nbsp;</td><td>
to throw errors. </td></tr>
<tr><td valign=top><em>timeout
</em>&nbsp;</td><td>
for all operations. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a1" doxytag="ost::TCPStream::TCPStream"></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::TCPStream::TCPStream </td>
          <td class="md">(&nbsp;</td>
          <td class="md">const <a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a> &amp;</td>
          <td class="mdname">&nbsp; <em>host</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></td>
          <td class="md">int</td>
          <td class="mdname">&nbsp; <em>size</em> = 512, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">bool</td>
          <td class="mdname">&nbsp; <em>throwflag</em> = true, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="thread_8h.html#a11">timeout_t</a></td>
          <td class="mdname">&nbsp; <em>to</em> = 0</td>
        </tr>
        <tr>
          <td></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 TCP stream by connecting to a TCP socket (on a remote machine).
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>host
</em>&nbsp;</td><td>
address of remote TCP server. </td></tr>
<tr><td valign=top><em>port
</em>&nbsp;</td><td>
number to connect. </td></tr>
<tr><td valign=top><em>size
</em>&nbsp;</td><td>
of streaming input and output buffers. </td></tr>
<tr><td valign=top><em>flag
</em>&nbsp;</td><td>
to throw errors. </td></tr>
<tr><td valign=top><em>timeout
</em>&nbsp;</td><td>
for all operations. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a3" doxytag="ost::TCPStream::TCPStream"></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::TCPStream::TCPStream </td>
          <td class="md">(&nbsp;</td>
          <td class="md">const TCPStream &amp;</td>
          <td class="mdname1">&nbsp; <em>source</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>
A copy constructor creates a new stream buffer.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>source
</em>&nbsp;</td><td>
of copy. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a4" doxytag="ost::TCPStream::~TCPStream"></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::TCPStream::~TCPStream </td>
          <td class="md">(&nbsp;</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline, 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 name="b1" doxytag="ost::TCPStream::Allocate"></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::TCPStream::Allocate </td>
          <td class="md">(&nbsp;</td>
          <td class="md">int</td>
          <td class="mdname1">&nbsp; <em>size</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>
Used to allocate the buffer space needed for iostream operations.
<p>
This function is called by the constructor.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>size
</em>&nbsp;</td><td>
of stream buffers from constructor. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="b6" doxytag="ost::TCPStream::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"> void ost::TCPStream::Connect </td>
          <td class="md">(&nbsp;</td>
          <td class="md">const <a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a> &amp;</td>
          <td class="mdname">&nbsp; <em>host</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></td>
          <td class="md">int</td>
          <td class="mdname">&nbsp; <em>size</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>
Create a TCP stream by connecting to a TCP socket (on a remote machine).
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>host
</em>&nbsp;</td><td>
address of remote TCP server. </td></tr>
<tr><td valign=top><em>port
</em>&nbsp;</td><td>
number to connect. </td></tr>
<tr><td valign=top><em>size
</em>&nbsp;</td><td>
of streaming input and output buffers. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="b2" doxytag="ost::TCPStream::endStream"></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::TCPStream::endStream </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> [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 name="a7" doxytag="ost::TCPStream::getBufferSize"></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::TCPStream::getBufferSize </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]</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><dd>
size of stream buffers. </dl>    </td>
  </tr>
</table>
<a name="a6" doxytag="ost::TCPStream::isPending"></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::TCPStream::isPending </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="namespaceost.html#a96">sockpend_t</a></td>
          <td class="mdname">&nbsp; <em>pend</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="thread_8h.html#a11">timeout_t</a></td>
          <td class="mdname">&nbsp; <em>timeout</em> = TIMEOUT_INF</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></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. 
<p>
Reimplemented from <a class="el" href="classost_1_1_socket.html#a16">ost::Socket</a>.    </td>
  </tr>
</table>
<a name="b5" doxytag="ost::TCPStream::overflow"></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::TCPStream::overflow </td>
          <td class="md">(&nbsp;</td>
          <td class="md">int</td>
          <td class="mdname1">&nbsp; <em>ch</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>
This streambuf method is used to write the output buffer through the established tcp connection.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>char
</em>&nbsp;</td><td>
to push through. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
char pushed through. </dl>    </td>
  </tr>
</table>
<a name="a2" doxytag="ost::TCPStream::setTimeout"></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::TCPStream::setTimeout </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>to</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><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><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>timeout
</em>&nbsp;</td><td>
to set. </td></tr>
</table>
</dl>
<p>
Reimplemented in <a class="el" href="classost_1_1_u_r_l_stream.html#a16">ost::URLStream</a>.    </td>
  </tr>
</table>
<a name="a5" doxytag="ost::TCPStream::sync"></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::TCPStream::sync </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </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>
Flushes the stream input and output buffers, writes pending output.
<p>
<dl compact><dt><b>
Returns: </b><dd>
0 on success. </dl>    </td>
  </tr>
</table>
<a name="b7" doxytag="ost::TCPStream::tcp"></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="classstd_1_1iostream.html">std::iostream</a>* ost::TCPStream::tcp </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]</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 *<a class="el" href="classost_1_1_t_c_p_stream.html#b7">tcp</a>() &lt;&lt; "test".
<p>
<dl compact><dt><b>
Returns: </b><dd>
stream pointer of this object. </dl>    </td>
  </tr>
</table>
<a name="b4" doxytag="ost::TCPStream::uflow"></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::TCPStream::uflow </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> [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 establish tcp 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><dd>
char from tcp socket connection, EOF if not connected. </dl>    </td>
  </tr>
</table>
<a name="b3" doxytag="ost::TCPStream::underflow"></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 int ost::TCPStream::underflow </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> [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 tcp socket connection.
<p>
<dl compact><dt><b>
Returns: </b><dd>
char from get buffer, EOF if not connected. </dl>
<p>
Reimplemented in <a class="el" href="classost_1_1_u_r_l_stream.html#b1">ost::URLStream</a>.    </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a name="l0" doxytag="ost::TCPStream::crlf"></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"> TCPStream&amp; crlf </td>
          <td class="md">(&nbsp;</td>
          <td class="md">TCPStream &amp;</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><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 name="l1" doxytag="ost::TCPStream::lfcr"></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"> TCPStream&amp; lfcr </td>
          <td class="md">(&nbsp;</td>
          <td class="md">TCPStream &amp;</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><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 name="n1" doxytag="ost::TCPStream::bufsize"></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::TCPStream::bufsize<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="n2" doxytag="ost::TCPStream::gbuf"></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"> char* ost::TCPStream::gbuf<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="n3" doxytag="ost::TCPStream::pbuf"></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"> char * ost::TCPStream::pbuf<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="n0" doxytag="ost::TCPStream::timeout"></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="thread_8h.html#a11">timeout_t</a> ost::TCPStream::timeout<code> [protected]</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>