paradigm_3/html/
<!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>Socket class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.17 -->
<center>
<a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</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="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>Socket Class Reference</h1><code>#include &lt;<a class="el" href="socket_8h-source.html">socket.h</a>&gt;</code>
<p>
<a href="classSocket-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 Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a0">Socket</a> (SOCKET <a class="el" href="classSocket.html#o0">mSock</a>, int size=4096)</td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a1">Socket</a> (const Socket &amp;r_sock)</td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a2">~Socket</a> ()</td></tr>
<tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a3">Read</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a4">Write</a> (const char c)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a5">Write</a> (const string &amp;r_str)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a6">Write</a> (const char *p_char)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a7">Write</a> (const char *p_char, int len)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a8">Flush</a> ()</td></tr>
<tr><td nowrap align=right valign=top>SOCKET&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a9">GetSocket</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#a10">Close</a> ()</td></tr>
<tr><td colspan=2><br><h2>Private Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>Socket &amp;&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#c0">operator=</a> (const Socket &amp;r_sock)</td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>SOCKET&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#o0">mSock</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>network socket</em> <a href="#o0"></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="classSocket.html#o1">mSize</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>size of buffers</em> <a href="#o1"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#o2">mpInBuffer</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>the socket input buffer.</em> <a href="#o2"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#o3">mpOutBuffer</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>the socket output buffer.</em> <a href="#o3"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#o4">mpRead</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>pointer to the start of data in mpInBuffer.</em> <a href="#o4"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#o5">mpEod</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>pointer to the end of data in mpInBuffer.</em> <a href="#o5"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#o6">mpWrite</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>pointer to the next write position in mpOutBuffer.</em> <a href="#o6"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classSocket.html#o7">mpStartWrite</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>pointer to the data to start send in mpOutBuffer.</em> <a href="#o7"></a><em></em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The Socket class contains the minimum amount of attributes to reasonably maintain a socket connection with a client.
<p>
<dl compact><dt><b>Note: </b></dt><dd>
 This was refactored out of the <a class="el" href="classConnection.html">Connection</a> class and implemented there as a composite member. It might have been made a superclass were it not for the all the functions we'd have to remap and/or override to keep exception and error handling safely within the <a class="el" href="classConnection.html">Connection</a> class. </dl>
<p>

<p>
Definition at line <a class="el" href="socket_8h-source.html#l00053">53</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="Socket::Socket"></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"> Socket::Socket </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">SOCKET&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>sock</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>size</em> = 4096</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>
The constructor for Socket<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>sock</em>&nbsp;</td><td>
The network socket to be associated with this Socket. </td></tr>
<tr><td valign=top><em>size</em>&nbsp;</td><td>
The size to allocate the both input and output buffers. Defaults to 4096. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00024">24</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8h-source.html#l00074">mpEod</a>, <a class="el" href="socket_8h-source.html#l00071">mpInBuffer</a>, <a class="el" href="socket_8h-source.html#l00072">mpOutBuffer</a>, <a class="el" href="socket_8h-source.html#l00073">mpRead</a>, <a class="el" href="socket_8h-source.html#l00076">mpStartWrite</a>, <a class="el" href="socket_8h-source.html#l00075">mpWrite</a>, and <a class="el" href="socket_8h-source.html#l00070">mSize</a>.    </td>
  </tr>
</table>
<a name="a1" doxytag="Socket::Socket"></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"> Socket::Socket </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const Socket &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>r_sock</em>          </td>
          <td class="md" valign="top">)&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>
The copy constructor for Socket<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>r_sock</em>&nbsp;</td><td>
The Socket to copy. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00036">36</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8h-source.html#l00074">mpEod</a>, <a class="el" href="socket_8h-source.html#l00071">mpInBuffer</a>, <a class="el" href="socket_8h-source.html#l00072">mpOutBuffer</a>, <a class="el" href="socket_8h-source.html#l00073">mpRead</a>, <a class="el" href="socket_8h-source.html#l00076">mpStartWrite</a>, <a class="el" href="socket_8h-source.html#l00075">mpWrite</a>, and <a class="el" href="socket_8h-source.html#l00070">mSize</a>.    </td>
  </tr>
</table>
<a name="a2" doxytag="Socket::~Socket"></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"> Socket::~Socket </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&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>
Destructor for Socket 
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00053">53</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8h-source.html#l00071">mpInBuffer</a>, and <a class="el" href="socket_8h-source.html#l00072">mpOutBuffer</a>.    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a10" doxytag="Socket::Close"></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 Socket::Close </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&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>
Close is called to close a Socket stream. 
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00240">240</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8h-source.html#l00069">mSock</a>, and <a class="el" href="socket_8cpp-source.html#l00069">Read</a>().
<p>
Referenced by <a class="el" href="connection_8cpp-source.html#l00162">Connection::Disconnect</a>().    </td>
  </tr>
</table>
<a name="a8" doxytag="Socket::Flush"></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 Socket::Flush </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&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>
Flush sends the contents of the mOutBuffer to the socket stream. One must call flush to actually send the data in the buffer, although the buffer will automatically flush itself when it reaches mSize.<dl compact><dt><b>Exceptions: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classShutdownException.html">ShutdownException</a></em>&nbsp;</td><td>
 Indicates that our connection has closed. </td></tr>
<tr><td valign=top><em><a class="el" href="classBlockingException.html">BlockingException</a></em>&nbsp;</td><td>
 Normal condition that indicates the end of data </td></tr>
<tr><td valign=top><em><a class="el" href="classIOErrorException.html">IOErrorException</a></em>&nbsp;</td><td>
 This is a non-recoverable error that could indicate any number of conditions. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00203">203</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8h-source.html#l00072">mpOutBuffer</a>, <a class="el" href="socket_8h-source.html#l00076">mpStartWrite</a>, <a class="el" href="socket_8h-source.html#l00075">mpWrite</a>, <a class="el" href="socket_8h-source.html#l00070">mSize</a>, and <a class="el" href="socket_8h-source.html#l00069">mSock</a>.
<p>
Referenced by <a class="el" href="connection_8cpp-source.html#l00135">Connection::HandleOutput</a>(), and <a class="el" href="socket_8cpp-source.html#l00106">Write</a>().    </td>
  </tr>
</table>
<a name="a9" doxytag="Socket::GetSocket"></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"> SOCKET Socket::GetSocket </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&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>
GetSocket gets the sockets value.
<p>
<dl compact><dt><b>Returns :</b></dt><dd>
the Socket's SOCKET value. </dl>
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00233">233</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8h-source.html#l00069">mSock</a>.
<p>
Referenced by <a class="el" href="connection_8cpp-source.html#l00211">Connection::GetSocket</a>().    </td>
  </tr>
</table>
<a name="c0" doxytag="Socket::operator="></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"> Socket&amp; Socket::operator= </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const Socket &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>r_sock</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [private]</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="a3" doxytag="Socket::Read"></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 Socket::Read </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&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>
Read fetches a single character from the socket stream. We buffer our reads here.
<p>
<dl compact><dt><b>Returns :</b></dt><dd>
char A single character read from the socket stream.</dl><dl compact><dt><b>Exceptions: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classShutdownException.html">ShutdownException</a></em>&nbsp;</td><td>
 Indicates that our connection has closed. </td></tr>
<tr><td valign=top><em><a class="el" href="classBlockingException.html">BlockingException</a></em>&nbsp;</td><td>
 Normal condition that indicates the end of data </td></tr>
<tr><td valign=top><em><a class="el" href="classIOErrorException.html">IOErrorException</a></em>&nbsp;</td><td>
 This is a non-recoverable error that could indicate any number of conditions. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00069">69</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8h-source.html#l00074">mpEod</a>, <a class="el" href="socket_8h-source.html#l00071">mpInBuffer</a>, <a class="el" href="socket_8h-source.html#l00073">mpRead</a>, <a class="el" href="socket_8h-source.html#l00070">mSize</a>, and <a class="el" href="socket_8h-source.html#l00069">mSock</a>.
<p>
Referenced by <a class="el" href="socket_8cpp-source.html#l00240">Close</a>(), and <a class="el" href="connection_8cpp-source.html#l00073">Connection::HandleInput</a>().    </td>
  </tr>
</table>
<a name="a7" doxytag="Socket::Write"></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 Socket::Write </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>p_char</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>len</em></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>
Write pushes the contents of a character array to the socket stream.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>p_char</em>&nbsp;</td><td>
An array of characters to be pushed to the socket stream. </td></tr>
<tr><td valign=top><em>len</em>&nbsp;</td><td>
The number of characters to be pushed to the socket stream.</td></tr>
</table>
</dl><dl compact><dt><b>Exceptions: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classShutdownException.html">ShutdownException</a></em>&nbsp;</td><td>
 Indicates that our connection has closed. </td></tr>
<tr><td valign=top><em><a class="el" href="classBlockingException.html">BlockingException</a></em>&nbsp;</td><td>
 Normal condition that indicates the end of data </td></tr>
<tr><td valign=top><em><a class="el" href="classIOErrorException.html">IOErrorException</a></em>&nbsp;</td><td>
 This is a non-recoverable error that could indicate any number of conditions.</td></tr>
</table>
</dl><dl compact><dt><b>Note: </b></dt><dd>
 Any exceptions will be thrown from flush() in called character Write.</dl><dl compact><dt><b><a class="el" href="todo.html#_todo000011">Todo: </a></b></dt><dd>
 We need a nice way to handle partially written character arrays here in the odd case that send blocks in the middle of this Write. </dl> 
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00185">185</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8cpp-source.html#l00106">Write</a>().    </td>
  </tr>
</table>
<a name="a6" doxytag="Socket::Write"></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 Socket::Write </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>p_char</em>          </td>
          <td class="md" valign="top">)&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>
Write pushes the contents of a null terminated character array to the socket stream.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>p_char</em>&nbsp;</td><td>
A null terminated character array to be pushed to the socket stream.</td></tr>
</table>
</dl><dl compact><dt><b>Exceptions: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classShutdownException.html">ShutdownException</a></em>&nbsp;</td><td>
 Indicates that our connection has closed. </td></tr>
<tr><td valign=top><em><a class="el" href="classBlockingException.html">BlockingException</a></em>&nbsp;</td><td>
 Normal condition that indicates the end of data </td></tr>
<tr><td valign=top><em><a class="el" href="classIOErrorException.html">IOErrorException</a></em>&nbsp;</td><td>
 This is a non-recoverable error that could indicate any number of conditions.</td></tr>
</table>
</dl><dl compact><dt><b>Note: </b></dt><dd>
 Any exceptions will be thrown from flush() in called character Write.</dl><dl compact><dt><b><a class="el" href="todo.html#_todo000010">Todo: </a></b></dt><dd>
 We need a nice way to handle partially written character arrays here in the odd case that send blocks in the middle of this Write. </dl> 
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00160">160</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8cpp-source.html#l00106">Write</a>().    </td>
  </tr>
</table>
<a name="a5" doxytag="Socket::Write"></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 Socket::Write </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>r_str</em>          </td>
          <td class="md" valign="top">)&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>
Write pushes the contents of a string to the socket stream.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>r_str</em>&nbsp;</td><td>
A text string to be pushed to the socket stream.</td></tr>
</table>
</dl><dl compact><dt><b>Exceptions: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classShutdownException.html">ShutdownException</a></em>&nbsp;</td><td>
 Indicates that our connection has closed. </td></tr>
<tr><td valign=top><em><a class="el" href="classBlockingException.html">BlockingException</a></em>&nbsp;</td><td>
 Normal condition that indicates the end of data </td></tr>
<tr><td valign=top><em><a class="el" href="classIOErrorException.html">IOErrorException</a></em>&nbsp;</td><td>
 This is a non-recoverable error that could indicate any number of conditions.</td></tr>
</table>
</dl><dl compact><dt><b>Note: </b></dt><dd>
 Any exceptions will be thrown from flush() in called character Write.</dl><dl compact><dt><b><a class="el" href="todo.html#_todo000009">Todo: </a></b></dt><dd>
 We need a nice way to handle partially written strings here in the odd case that send blocks in the middle of this Write. </dl> 
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00133">133</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8cpp-source.html#l00106">Write</a>().    </td>
  </tr>
</table>
<a name="a4" doxytag="Socket::Write"></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 Socket::Write </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>c</em>          </td>
          <td class="md" valign="top">)&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>
Write pushes a single character to the socket stream. We buffer our writes here. One must call flush to actually send the data in the buffer, although the buffer will automatically flush itself when it reaches mSize.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>c</em>&nbsp;</td><td>
A single character to be pushed to the socket stream.</td></tr>
</table>
</dl><dl compact><dt><b>Exceptions: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classShutdownException.html">ShutdownException</a></em>&nbsp;</td><td>
 Indicates that our connection has closed. </td></tr>
<tr><td valign=top><em><a class="el" href="classBlockingException.html">BlockingException</a></em>&nbsp;</td><td>
 Normal condition that indicates the end of data </td></tr>
<tr><td valign=top><em><a class="el" href="classIOErrorException.html">IOErrorException</a></em>&nbsp;</td><td>
 This is a non-recoverable error that could indicate any number of conditions.</td></tr>
</table>
</dl><dl compact><dt><b>Note: </b></dt><dd>
 Any exceptions will be thrown from flush(). </dl>
<p>
Definition at line <a class="el" href="socket_8cpp-source.html#l00106">106</a> of file <a class="el" href="socket_8cpp-source.html">socket.cpp</a>.
<p>
References <a class="el" href="socket_8cpp-source.html#l00203">Flush</a>(), <a class="el" href="socket_8h-source.html#l00072">mpOutBuffer</a>, <a class="el" href="socket_8h-source.html#l00075">mpWrite</a>, and <a class="el" href="socket_8h-source.html#l00070">mSize</a>.
<p>
Referenced by <a class="el" href="connection_8cpp-source.html#l00135">Connection::HandleOutput</a>(), and <a class="el" href="socket_8cpp-source.html#l00133">Write</a>().    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="o5" doxytag="Socket::mpEod"></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* Socket::mpEod<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
pointer to the end of data in mpInBuffer.
<p>

<p>
Definition at line <a class="el" href="socket_8h-source.html#l00074">74</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.
<p>
Referenced by <a class="el" href="socket_8cpp-source.html#l00069">Read</a>(), and <a class="el" href="socket_8cpp-source.html#l00024">Socket</a>().    </td>
  </tr>
</table>
<a name="o2" doxytag="Socket::mpInBuffer"></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* Socket::mpInBuffer<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
the socket input buffer.
<p>

<p>
Definition at line <a class="el" href="socket_8h-source.html#l00071">71</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.
<p>
Referenced by <a class="el" href="socket_8cpp-source.html#l00069">Read</a>(), <a class="el" href="socket_8cpp-source.html#l00024">Socket</a>(), and <a class="el" href="socket_8cpp-source.html#l00053">~Socket</a>().    </td>
  </tr>
</table>
<a name="o3" doxytag="Socket::mpOutBuffer"></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* Socket::mpOutBuffer<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
the socket output buffer.
<p>

<p>
Definition at line <a class="el" href="socket_8h-source.html#l00072">72</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.
<p>
Referenced by <a class="el" href="socket_8cpp-source.html#l00203">Flush</a>(), <a class="el" href="socket_8cpp-source.html#l00024">Socket</a>(), <a class="el" href="socket_8cpp-source.html#l00106">Write</a>(), and <a class="el" href="socket_8cpp-source.html#l00053">~Socket</a>().    </td>
  </tr>
</table>
<a name="o4" doxytag="Socket::mpRead"></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* Socket::mpRead<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
pointer to the start of data in mpInBuffer.
<p>

<p>
Definition at line <a class="el" href="socket_8h-source.html#l00073">73</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.
<p>
Referenced by <a class="el" href="socket_8cpp-source.html#l00069">Read</a>(), and <a class="el" href="socket_8cpp-source.html#l00024">Socket</a>().    </td>
  </tr>
</table>
<a name="o7" doxytag="Socket::mpStartWrite"></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* Socket::mpStartWrite<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
pointer to the data to start send in mpOutBuffer.
<p>

<p>
Definition at line <a class="el" href="socket_8h-source.html#l00076">76</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.
<p>
Referenced by <a class="el" href="socket_8cpp-source.html#l00203">Flush</a>(), and <a class="el" href="socket_8cpp-source.html#l00024">Socket</a>().    </td>
  </tr>
</table>
<a name="o6" doxytag="Socket::mpWrite"></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* Socket::mpWrite<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
pointer to the next write position in mpOutBuffer.
<p>

<p>
Definition at line <a class="el" href="socket_8h-source.html#l00075">75</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.
<p>
Referenced by <a class="el" href="socket_8cpp-source.html#l00203">Flush</a>(), <a class="el" href="socket_8cpp-source.html#l00024">Socket</a>(), and <a class="el" href="socket_8cpp-source.html#l00106">Write</a>().    </td>
  </tr>
</table>
<a name="o1" doxytag="Socket::mSize"></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 Socket::mSize<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
size of buffers
<p>

<p>
Definition at line <a class="el" href="socket_8h-source.html#l00070">70</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.
<p>
Referenced by <a class="el" href="socket_8cpp-source.html#l00203">Flush</a>(), <a class="el" href="socket_8cpp-source.html#l00069">Read</a>(), <a class="el" href="socket_8cpp-source.html#l00024">Socket</a>(), and <a class="el" href="socket_8cpp-source.html#l00106">Write</a>().    </td>
  </tr>
</table>
<a name="o0" doxytag="Socket::mSock"></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"> SOCKET Socket::mSock<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
network socket
<p>

<p>
Definition at line <a class="el" href="socket_8h-source.html#l00069">69</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.
<p>
Referenced by <a class="el" href="socket_8cpp-source.html#l00240">Close</a>(), <a class="el" href="socket_8cpp-source.html#l00203">Flush</a>(), <a class="el" href="socket_8cpp-source.html#l00233">GetSocket</a>(), and <a class="el" href="socket_8cpp-source.html#l00069">Read</a>().    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="socket_8h-source.html">socket.h</a><li><a class="el" href="socket_8cpp-source.html">socket.cpp</a></ul>
<hr><address style="align: right;"><small>Generated on Mon Mar 29 23:12:58 2004 for Paradigm by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.17 </small></address>
</body>
</html>