diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a02445.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a02445.html | 1748 |
1 files changed, 1748 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02445.html b/docs/doxygen/nel/a02445.html new file mode 100644 index 00000000..a4126168 --- /dev/null +++ b/docs/doxygen/nel/a02445.html @@ -0,0 +1,1748 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>NeL: NLNET::CTcpSock class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NLNET::CTcpSock Class Reference</h1><code>#include <<a class="el" href="a06488.html">tcp_sock.h</a>></code> +<p> +<p>Inheritance diagram for NLNET::CTcpSock: +<p><center><img src="a02445.png" usemap="#NLNET::CTcpSock_map" border="0" alt=""></center> +<map name="NLNET::CTcpSock_map"> +<area href="a02444.html" alt="NLNET::CSock" shape="rect" coords="83,0,240,24"> +<area href="a02443.html" alt="NLNET::CDummyTcpSock" shape="rect" coords="0,112,157,136"> +<area href="a02769.html" alt="NLNET::CListenSock" shape="rect" coords="167,112,324,136"> +</map> +<hr><a name="_details"></a><h2>Detailed Description</h2> +<a class="el" href="a02445.html">CTcpSock</a>: Reliable socket via TCP. See base class <a class="el" href="a02444.html">CSock</a>.<p> +When to set No Delay mode on ? Set TCP_NODELAY (call setNoDelay(true)) *only* if you have to send small buffers that need to be sent *immediately*. It should only be set for applications that send frequent small bursts of information without getting an immediate response, where timely delivery of data is required (the canonical example is mouse movements). Setting TCP_NODELAY on increases the network traffic (more overhead). In the normal behavior of <a class="el" href="a02444.html">CSock</a>, TCP_NODELAY is off i.e. the Nagle buffering algorithm is enabled.<p> +<dl compact><dt><b>Author:</b></dt><dd>Olivier Cado <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2000-2001 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a06488.html#l00051">51</a> of file <a class="el" href="a06488.html">tcp_sock.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Socket setup</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_0">connect</a> (const <a class="el" href="a02665.html">CInetAddress</a> &<a class="el" href="a04223.html#a657">addr</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_1">connectWithCustomWindowSize</a> (const <a class="el" href="a02665.html">CInetAddress</a> &<a class="el" href="a04223.html#a657">addr</a>, int windowsize)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_2">CTcpSock</a> (SOCKET sock, const <a class="el" href="a02665.html">CInetAddress</a> &remoteaddr)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a <a class="el" href="a02445.html">CTcpSock</a> object using an already connected socket descriptor and its associated remote address. <a href="#NLNET_1_1CTcpSockz2111_2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_3">CTcpSock</a> (bool logging=true)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_4">disconnect</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Active disconnection (shutdown) (mutexed). <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2109_0">connected()</a> becomes false. <a href="#NLNET_1_1CTcpSockz2111_4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_5">getWindowSize</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the TCP Window Size for the current socket. <a href="#NLNET_1_1CTcpSockz2111_5"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_6">setNoDelay</a> (bool <a class="el" href="a04223.html#a658">value</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_7">shutdownReceiving</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Active disconnection for download way only (partial shutdown). <a href="#NLNET_1_1CTcpSockz2111_7"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_8">shutdownSending</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Active disconnection for upload way only (partial shutdown). <a href="#NLNET_1_1CTcpSockz2111_8"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Receiving data</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockz2105_0">dataAvailable</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Checks if there is some data to receive, waiting (blocking) at most for the time out value. <a href="#NLNET_1_1CUdpSockz2105_0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02444.html#NLNET_1_1CUdpSockw3">CSock::TSockResult</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CTcpSockz2105_1">receive</a> (<a class="el" href="a04558.html#a7">uint8</a> *<a class="el" href="a04223.html#a589">buffer</a>, <a class="el" href="a04558.html#a11">uint32</a> &<a class="el" href="a04223.html#a571">len</a>, bool throw_exception=true)</td></tr> + +<tr><td colspan=2><br><h2>Public Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockw3">TSockResult</a> { <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw2">Ok</a>, +<a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw4">WouldBlock</a>, +<a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw0">ConnectionClosed</a>, +<a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw1">Error</a> + }</td></tr> + +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocka0">bytesReceived</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of bytes received since the latest connection. <a href="#NLNET_1_1CUdpSocka0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocka1">bytesSent</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of bytes sent since the latest connection. <a href="#NLNET_1_1CUdpSocka1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocka2">getSendBufferSize</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the send buffer size. <a href="#NLNET_1_1CUdpSocka2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocka3">setSendBufferSize</a> (<a class="el" href="a04558.html#a10">sint32</a> <a class="el" href="a04223.html#a587">size</a>)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the send buffer size. <a href="#NLNET_1_1CUdpSocka3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocka4">setTimeOutValue</a> (long sec, long ms)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Change the time out value used in getDataAvailable(), which is 0 by default. <a href="#NLNET_1_1CUdpSocka4"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocke0">errorString</a> (<a class="el" href="a04558.html#a15">uint</a> errorcode)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a string explaining the network error (see <a class="el" href="a02444.html#NLNET_1_1CUdpSocke1">getLastError()</a>). <a href="#NLNET_1_1CUdpSocke0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocke1">getLastError</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocke2">initialized</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the network engine is initialized. <a href="#NLNET_1_1CUdpSocke2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocke3">initNetwork</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the network engine, if it is not already done. <a href="#NLNET_1_1CUdpSocke3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSocke4">releaseNetwork</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Releases the network engine. <a href="#NLNET_1_1CUdpSocke4"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockb0">createSocket</a> (int <a class="el" href="a04223.html#a581">type</a>, int protocol)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates the socket and get a valid descriptor. <a href="#NLNET_1_1CUdpSockb0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockb1">setLocalAddress</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the local address. <a href="#NLNET_1_1CUdpSockb1"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp0">_BytesReceived</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Number of bytes received on this socket. <a href="#NLNET_1_1CUdpSockp0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp1">_BytesSent</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Number of bytes sent on this socket. <a href="#NLNET_1_1CUdpSockp1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>volatile bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp2">_Connected</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">True after calling <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2103_1">connect()</a>. <a href="#NLNET_1_1CUdpSockp2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02665.html">CInetAddress</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp3">_LocalAddr</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Address of local host (valid if connected). <a href="#NLNET_1_1CUdpSockp3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp4">_Logging</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">If false, do not log any information. <a href="#NLNET_1_1CUdpSockp4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp5">_NonBlocking</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">If true, the socket is in nonblocking mode. <a href="#NLNET_1_1CUdpSockp5"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02665.html">CInetAddress</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp6">_RemoteAddr</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Address of the remote host (valid if connected). <a href="#NLNET_1_1CUdpSockp6"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>SOCKET </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp7">_Sock</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Socket descriptor. <a href="#NLNET_1_1CUdpSockp7"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>long </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp8">_TimeoutMs</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Secondary time out value (ms) for select in <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2105_0">dataAvailable()</a>. <a href="#NLNET_1_1CUdpSockp8"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>long </td><td class="memItemRight" valign=bottom><a class="el" href="a02444.html#NLNET_1_1CUdpSockp9">_TimeoutS</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Main time out value (sec) for select in <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2105_0">dataAvailable()</a>. <a href="#NLNET_1_1CUdpSockp9"></a><br><br></td></tr> +</table> +<hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="NLNET_1_1CUdpSockw3" doxytag="NLNET::CTcpSock::TSockResult" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> enum <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3">NLNET::CSock::TSockResult</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw2" doxytag="Ok" ></a>Ok</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw4" doxytag="WouldBlock" ></a>WouldBlock</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw0" doxytag="ConnectionClosed" ></a>ConnectionClosed</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw1" doxytag="Error" ></a>Error</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06405.html#l00125">125</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +<div class="fragment"><pre>00125 { <a class="code" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw2">Ok</a>, <a class="code" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw4">WouldBlock</a>, <a class="code" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw0">ConnectionClosed</a>, <a class="code" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw1">Error</a> }; +</pre></div> </td> + </tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLNET_1_1CTcpSockz2111_3" doxytag="NLNET::CTcpSock::CTcpSock" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLNET::CTcpSock::CTcpSock </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>logging</em> = true </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Constructor. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>logging</em> </td><td>Disable logging if the server socket object is used by the logging system, to avoid infinite recursion</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06487.html#l00061">61</a> of file <a class="el" href="a06487.html">tcp_sock.cpp</a>. +<p> +Referenced by <a class="el" href="a05913.html#l00129">NLNET::CListenSock::accept()</a>. +<p> +<div class="fragment"><pre>00061 : +00062 <a class="code" href="a02444.html#NLNET_1_1CSockb2">CSock</a>( logging ) +00063 {} + +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CTcpSockz2111_2" doxytag="NLNET::CTcpSock::CTcpSock" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLNET::CTcpSock::CTcpSock </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">SOCKET </td> + <td class="mdname" nowrap> <em>sock</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a02665.html">CInetAddress</a> & </td> + <td class="mdname" nowrap> <em>remoteaddr</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Construct a <a class="el" href="a02445.html">CTcpSock</a> object using an already connected socket descriptor and its associated remote address. +<p> + +<p> +Definition at line <a class="el" href="a06487.html#l00069">69</a> of file <a class="el" href="a06487.html">tcp_sock.cpp</a>. +<p> +<div class="fragment"><pre>00069 : +00070 <a class="code" href="a02444.html#NLNET_1_1CSockb2">CSock</a>( sock, remoteaddr ) +00071 {} + +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLNET_1_1CUdpSocka0" doxytag="NLNET::CTcpSock::bytesReceived" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a13">uint64</a> NLNET::CSock::bytesReceived </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the number of bytes received since the latest connection. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00249">249</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +References <a class="el" href="a05981.html#l00102">uint64</a>. +<p> +Referenced by <a class="el" href="a05507.html#l00172">NLNET::CBufClient::bytesDownloaded()</a>. +<p> +<div class="fragment"><pre>00249 { <span class="keywordflow">return</span> <a class="code" href="a02444.html#NLNET_1_1CUdpSockp0">_BytesReceived</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSocka1" doxytag="NLNET::CTcpSock::bytesSent" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a13">uint64</a> NLNET::CSock::bytesSent </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the number of bytes sent since the latest connection. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00252">252</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +References <a class="el" href="a05981.html#l00102">uint64</a>. +<p> +Referenced by <a class="el" href="a05507.html#l00175">NLNET::CBufClient::bytesUploaded()</a>. +<p> +<div class="fragment"><pre>00252 { <span class="keywordflow">return</span> <a class="code" href="a02444.html#NLNET_1_1CUdpSockp1">_BytesSent</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2103_0" doxytag="NLNET::CTcpSock::close" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual void NLNET::CSock::close </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Closes the socket (without shutdown) In general you don't need to call this method. But you can call it to:<ul> +<li>close a listening socket (i.e. stop accepting connections), or</li><li>stop a select() in progress in another thread (in this case, just calling the destructor is not enough)</li></ul> + +<p> +Reimplemented in <a class="el" href="a02443.html#NLNET_1_1CDummyTcpSocka3">NLNET::CDummyTcpSock</a>. +<p> +Referenced by <a class="el" href="a06641.html#l00231">NLNET::CUdpSimSock::close()</a>, <a class="el" href="a05513.html#l00101">NLNET::CListenTask::close()</a>, <a class="el" href="a06487.html#l00080">connect()</a>, and <a class="el" href="a05670.html#l00128">NLNET::sendEmail()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CTcpSockz2111_0" doxytag="NLNET::CTcpSock::connect" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CTcpSock::connect </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02665.html">CInetAddress</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>addr</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Connection. You can reconnect a socket after being disconnected. This method does not return a boolean, otherwise a programmer could ignore the result and no exception would be thrown if connection fails :<ul> +<li>If addr is not valid, an exception <a class="el" href="a03810.html">ESocket</a> is thrown</li><li>If <a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_0">connect()</a> fails for another reason, an exception <a class="el" href="a03812.html">ESocketConnectionFailed</a> is thrown</li></ul> + +<p> +Reimplemented from <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2103_1">NLNET::CSock</a>. +<p> +Reimplemented in <a class="el" href="a02443.html#NLNET_1_1CDummyTcpSocka4">NLNET::CDummyTcpSock</a>. +<p> +Definition at line <a class="el" href="a06487.html#l00080">80</a> of file <a class="el" href="a06487.html">tcp_sock.cpp</a>. +<p> +References <a class="el" href="a05646.html#l01127">addr</a>, <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2103_0">NLNET::CSock::close()</a>, and <a class="el" href="a02444.html#NLNET_1_1CUdpSockb0">NLNET::CSock::createSocket()</a>. +<p> +Referenced by <a class="el" href="a05514.html#l00295">NLNET::CBufSock::connect()</a>, and <a class="el" href="a05670.html#l00128">NLNET::sendEmail()</a>. +<p> +<div class="fragment"><pre>00081 { +00082 <span class="comment">// Create a new socket</span> +00083 <span class="keywordflow">if</span> ( <a class="code" href="a02444.html#NLNET_1_1CUdpSockp7">_Sock</a> != INVALID_SOCKET ) +00084 { +00085 <span class="keywordflow">if</span> ( <a class="code" href="a02444.html#NLNET_1_1CUdpSockp4">_Logging</a> ) +00086 { +00087 <span class="comment">// nldebug( "LNETL0: Closing socket %d before reconnecting", _Sock );</span> +00088 } +00089 <a class="code" href="a02444.html#NLNET_1_1CUdpSockz2103_0">close</a>(); +00090 } +00091 <a class="code" href="a02444.html#NLNET_1_1CUdpSockb0">createSocket</a>( SOCK_STREAM, IPPROTO_TCP ); +00092 +00093 <span class="comment">// Connection</span> +00094 CSock::connect( addr ); +00095 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2109_0" doxytag="NLNET::CTcpSock::connected" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLNET::CSock::connected </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns if the socket is connected (mutexed). +<p> + +<p> +Referenced by <a class="el" href="a05524.html#l00286">NLNET::CCallbackClient::connect()</a>, <a class="el" href="a05514.html#l00295">NLNET::CBufSock::connect()</a>, <a class="el" href="a05506.html#l00085">NLNET::CBufClient::connect()</a>, <a class="el" href="a06641.html#l00306">NLNET::CUdpSimSock::connected()</a>, <a class="el" href="a05958.html#l00101">NLNET::CLoginClient::connectToShard()</a>, <a class="el" href="a05512.html#l00251">NLNET::CBufServer::disconnect()</a>, <a class="el" href="a05506.html#l00318">NLNET::CBufClient::disconnect()</a>, <a class="el" href="a05515.html#l00178">NLNET::CBufSock::pushBuffer()</a>, <a class="el" href="a05670.html#l00128">NLNET::sendEmail()</a>, <a class="el" href="a05506.html#l00296">NLNET::CBufClient::update()</a>, and <a class="el" href="a05506.html#l00397">NLNET::CBufClient::~CBufClient()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CTcpSockz2111_1" doxytag="NLNET::CTcpSock::connectWithCustomWindowSize" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CTcpSock::connectWithCustomWindowSize </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02665.html">CInetAddress</a> & </td> + <td class="mdname" nowrap> <em>addr</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>int </td> + <td class="mdname" nowrap> <em>windowsize</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sets a custom TCP Window size (SO_RCVBUF and SO_SNDBUF). You must close the socket is necessary, before calling this method.<p> +See <a href="http://www.ncsa.uiuc.edu/People/vwelch/net_perf/tcp_windows.html">http://www.ncsa.uiuc.edu/People/vwelch/net_perf/tcp_windows.html</a> +<p> +Definition at line <a class="el" href="a06487.html#l00161">161</a> of file <a class="el" href="a06487.html">tcp_sock.cpp</a>. +<p> +References <a class="el" href="a05646.html#l01127">addr</a>, <a class="el" href="a02444.html#NLNET_1_1CUdpSockb0">NLNET::CSock::createSocket()</a>, and <a class="el" href="a05622.html#l00154">nlerror</a>. +<p> +<div class="fragment"><pre>00162 { +00163 <span class="comment">// Create socket</span> +00164 <span class="keywordflow">if</span> ( <a class="code" href="a02444.html#NLNET_1_1CUdpSockp7">_Sock</a> != INVALID_SOCKET ) +00165 { +00166 <a class="code" href="a04199.html#a3">nlerror</a>( <span class="stringliteral">"Cannot connect with custom window size when already connected"</span> ); +00167 } +00168 <a class="code" href="a02444.html#NLNET_1_1CUdpSockb0">createSocket</a>( SOCK_STREAM, IPPROTO_TCP ); +00169 +00170 <span class="comment">// Change window size</span> +00171 <span class="keywordflow">if</span> ( setsockopt( _Sock, SOL_SOCKET, SO_SNDBUF, (<span class="keywordtype">char</span>*)&windowsize, <span class="keyword">sizeof</span>(windowsize) ) != 0 +00172 || setsockopt( _Sock, SOL_SOCKET, SO_RCVBUF, (<span class="keywordtype">char</span>*)&windowsize, <span class="keyword">sizeof</span>(windowsize) ) != 0 ) +00173 { +00174 <span class="keywordflow">throw</span> ESocket( <span class="stringliteral">"setWindowSize failed"</span> ); +00175 } +00176 +00177 <span class="comment">// Connection</span> +00178 CSock::connect( addr ); +00179 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockb0" doxytag="NLNET::CTcpSock::createSocket" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CSock::createSocket </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">int </td> + <td class="mdname" nowrap> <em>type</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>int </td> + <td class="mdname" nowrap> <em>protocol</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [protected, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Creates the socket and get a valid descriptor. +<p> + +<p> +Referenced by <a class="el" href="a05913.html#l00063">NLNET::CListenSock::CListenSock()</a>, <a class="el" href="a06487.html#l00080">connect()</a>, <a class="el" href="a06487.html#l00161">connectWithCustomWindowSize()</a>, and <a class="el" href="a06643.html#l00062">NLNET::CUdpSock::CUdpSock()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2105_0" doxytag="NLNET::CTcpSock::dataAvailable" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLNET::CSock::dataAvailable </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Checks if there is some data to receive, waiting (blocking) at most for the time out value. +<p> + +<p> +Referenced by <a class="el" href="a06641.html#l00238">NLNET::CUdpSimSock::dataAvailable()</a>, and <a class="el" href="a05506.html#l00437">NLNET::CClientReceiveTask::run()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2109_1" doxytag="NLNET::CTcpSock::descriptor" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> SOCKET NLNET::CSock::descriptor </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the socket descriptor. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00241">241</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +References <a class="el" href="a06405.html#l00281">NLNET::CSock::_Sock</a>. +<p> +Referenced by <a class="el" href="a05514.html#l00329">NLNET::CBufSock::asString()</a>, and <a class="el" href="a05512.html#l00779">NLNET::CListenTask::run()</a>. +<p> +<div class="fragment"><pre>00241 { <span class="keywordflow">return</span> <a class="code" href="a02444.html#NLNET_1_1CUdpSockp7">_Sock</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CTcpSockz2111_4" doxytag="NLNET::CTcpSock::disconnect" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CTcpSock::disconnect </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Active disconnection (shutdown) (mutexed). <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2109_0">connected()</a> becomes false. +<p> + +<p> +Reimplemented in <a class="el" href="a02443.html#NLNET_1_1CDummyTcpSocka5">NLNET::CDummyTcpSock</a>. +<p> +Definition at line <a class="el" href="a06487.html#l00101">101</a> of file <a class="el" href="a06487.html">tcp_sock.cpp</a>. +<p> +References <a class="el" href="a05810.html#l00385">NLNET::CInetAddress::asString()</a>, and <a class="el" href="a05622.html#l00101">nldebug</a>. +<p> +Referenced by <a class="el" href="a05514.html#l00315">NLNET::CBufSock::disconnect()</a>, <a class="el" href="a05512.html#l00251">NLNET::CBufServer::disconnect()</a>, <a class="el" href="a05506.html#l00437">NLNET::CClientReceiveTask::run()</a>, and <a class="el" href="a05506.html#l00296">NLNET::CBufClient::update()</a>. +<p> +<div class="fragment"><pre>00102 { +00103 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL0: Socket %d disconnecting from %s..."</span>, _Sock, <a class="code" href="a02444.html#NLNET_1_1CUdpSockp6">_RemoteAddr</a>.<a class="code" href="a02665.html#NLNET_1_1CInetAddressa1">asString</a>().c_str() ); +00104 +00105 <span class="comment">// This shutdown resets the connection immediatly (not a graceful closure)</span> +00106 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span> +00107 <span class="preprocessor"></span> ::shutdown( <a class="code" href="a02444.html#NLNET_1_1CUdpSockp7">_Sock</a>, SD_BOTH ); +00108 <span class="preprocessor">#elif defined NL_OS_UNIX</span> +00109 <span class="preprocessor"></span> ::shutdown( _Sock, SHUT_RDWR ); +00110 <span class="preprocessor">#endif</span> +00111 <span class="preprocessor"></span> <span class="comment">/*CSynchronized<bool>::CAccessor sync( &_SyncConnected );</span> +00112 <span class="comment"> sync.value() = false;*/</span> +00113 <a class="code" href="a02444.html#NLNET_1_1CUdpSockp2">_Connected</a> = <span class="keyword">false</span>; +00114 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSocke0" doxytag="NLNET::CTcpSock::errorString" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::string NLNET::CSock::errorString </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>errorcode</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns a string explaining the network error (see <a class="el" href="a02444.html#NLNET_1_1CUdpSocke1">getLastError()</a>). +<p> + </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSocke1" doxytag="NLNET::CTcpSock::getLastError" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NLNET::CSock::getLastError </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the code of the last error that has occured. Note: This code is platform-dependant. On Unix, it is errno; on Windows it is the Winsock error code. See also <a class="el" href="a02444.html#NLNET_1_1CUdpSocke0">errorString()</a> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSocka2" doxytag="NLNET::CTcpSock::getSendBufferSize" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a10">sint32</a> NLNET::CSock::getSendBufferSize </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Gets the send buffer size. +<p> + </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CTcpSockz2111_5" doxytag="NLNET::CTcpSock::getWindowSize" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> NLNET::CTcpSock::getWindowSize </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the TCP Window Size for the current socket. +<p> + +<p> +Definition at line <a class="el" href="a06487.html#l00185">185</a> of file <a class="el" href="a06487.html">tcp_sock.cpp</a>. +<p> +References <a class="el" href="a05646.html#l00235">len</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>00186 { +00187 <span class="keywordtype">int</span> windowsize = 0; +00188 socklen_t <a class="code" href="a04223.html#a571">len</a> = <span class="keyword">sizeof</span>( windowsize ); +00189 +00190 <span class="comment">/* send buffer -- query for buffer size */</span> +00191 <span class="keywordflow">if</span> ( getsockopt( _Sock, SOL_SOCKET, SO_SNDBUF, (<span class="keywordtype">char</span>*) &windowsize, &len ) == 0 ) +00192 { +00193 <span class="keywordflow">return</span> windowsize; +00194 } +00195 <span class="keywordflow">else</span> +00196 { +00197 <span class="keywordflow">return</span> 0; +00198 } +00199 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSocke2" doxytag="NLNET::CTcpSock::initialized" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLNET::CSock::initialized </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns true if the network engine is initialized. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00261">261</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +<div class="fragment"><pre>00261 { <span class="keywordflow">return</span> CSock::_Initialized; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSocke3" doxytag="NLNET::CTcpSock::initNetwork" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CSock::initNetwork </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Initialize the network engine, if it is not already done. +<p> + </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2109_2" doxytag="NLNET::CTcpSock::localAddr" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a02665.html">CInetAddress</a>& NLNET::CSock::localAddr </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns a const reference on the local address. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00235">235</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +References <a class="el" href="a06405.html#l00284">NLNET::CSock::_LocalAddr</a>. +<p> +Referenced by <a class="el" href="a05962.html#l00353">NLNET::CLoginServer::init()</a>, <a class="el" href="a06642.html#l00066">NLNET::CUdpSimSock::localAddr()</a>, and <a class="el" href="a05513.html#l00104">NLNET::CListenTask::localAddr()</a>. +<p> +<div class="fragment"><pre>00235 { <span class="keywordflow">return</span> <a class="code" href="a02444.html#NLNET_1_1CUdpSockp3">_LocalAddr</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2103_2" doxytag="NLNET::CTcpSock::nonBlockingMode" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLNET::CSock::nonBlockingMode </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the nonblocking mode. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00166">166</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +References <a class="el" href="a06405.html#l00293">NLNET::CSock::_NonBlocking</a>. +<p> +<div class="fragment"><pre>00166 { <span class="keywordflow">return</span> <a class="code" href="a02444.html#NLNET_1_1CUdpSockp5">_NonBlocking</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CTcpSockz2105_1" doxytag="NLNET::CTcpSock::receive" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3">CSock::TSockResult</a> NLNET::CSock::receive </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> * </td> + <td class="mdname" nowrap> <em>buffer</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> & </td> + <td class="mdname" nowrap> <em>len</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>throw_exception</em> = true</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Receive a partial or an entire block of data, depending on nonblocking mode.<p> +In blocking mode: the method waits until 'len' bytes have been received.<p> +In nonblocking mode: the method reads the bytes that have already been received only, and resets 'len' to the number of bytes read. The actual length may be smaller than the demanded length. In no data is available, the return value is <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw4">CSock::WouldBlock</a>. If <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2105_0">dataAvailable()</a> returns true, you are sure that <a class="el" href="a02444.html#NLNET_1_1CTcpSockz2105_1">receive()</a> will not return <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw4">CSock::WouldBlock</a>.<p> +In case of graceful disconnection:<ul> +<li><a class="el" href="a02444.html#NLNET_1_1CUdpSockz2109_0">connected()</a> become false</li><li>the return value is <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw0">CSock::ConnectionClosed</a> or an <a class="el" href="a03811.html">ESocketConnectionClosed</a> exception is thrown.</li></ul> +<p> +In case of failure (e.g. connection reset by peer) :<ul> +<li>the return value is <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw1">CSock::Error</a> or an <a class="el" href="a03810.html">ESocket</a> exception is thrown. You may want to close the connection manually.</li></ul> + +<p> +Reimplemented in <a class="el" href="a03628.html#NLNET_1_1CUdpSockz2115_0">NLNET::CUdpSock</a>. +<p> +Referenced by <a class="el" href="a05514.html#l00386">NLNET::CNonBlockingBufSock::receivePart()</a>, and <a class="el" href="a05670.html#l00086">NLNET::sendEMailCommand()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSocke4" doxytag="NLNET::CTcpSock::releaseNetwork" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CSock::releaseNetwork </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Releases the network engine. +<p> + </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2109_3" doxytag="NLNET::CTcpSock::remoteAddr" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a02665.html">CInetAddress</a>& NLNET::CSock::remoteAddr </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the address of the remote host. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00238">238</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +References <a class="el" href="a06405.html#l00287">NLNET::CSock::_RemoteAddr</a>. +<p> +Referenced by <a class="el" href="a05513.html#l00241">NLNET::CBufServer::hostAddress()</a>, <a class="el" href="a05514.html#l00386">NLNET::CNonBlockingBufSock::receivePart()</a>, <a class="el" href="a05507.html#l00169">NLNET::CBufClient::remoteAddress()</a>, and <a class="el" href="a05670.html#l00086">NLNET::sendEMailCommand()</a>. +<p> +<div class="fragment"><pre>00238 { <span class="keywordflow">return</span> <a class="code" href="a02444.html#NLNET_1_1CUdpSockp6">_RemoteAddr</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2107_0" doxytag="NLNET::CTcpSock::send" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3">CSock::TSockResult</a> NLNET::CSock::send </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a04558.html#a7">uint8</a> * </td> + <td class="mdname" nowrap> <em>buffer</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> & </td> + <td class="mdname" nowrap> <em>len</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>throw_exception</em> = true</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sends a message.<p> +In blocking mode: the method waits until 'len' bytes have been sent.<p> +In nonblocking mode : the method resets len to the actual number of bytes sent. Even if less bytes than expected have been sent, it returns <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw2">CSock::Ok</a>. The caller is expected to test the actual len to check if the remaining data must be resent.<p> +<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw2">CSock::Ok</a> or <a class="el" href="a02444.html#NLNET_1_1CUdpSockw3NLNET_1_1CUdpSockw1">CSock::Error</a> (in case of failure). When throw_exception is true, the method throws an <a class="el" href="a03810.html">ESocket</a> exception in case of failure. </dd></dl> + +<p> +Referenced by <a class="el" href="a05514.html#l00137">NLNET::CBufSock::flush()</a>, <a class="el" href="a05670.html#l00086">NLNET::sendEMailCommand()</a>, and <a class="el" href="a06641.html#l00107">NLNET::CUdpSimSock::sendUDPNow()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockb1" doxytag="NLNET::CTcpSock::setLocalAddress" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CSock::setLocalAddress </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [protected, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sets the local address. +<p> + +<p> +Referenced by <a class="el" href="a06643.html#l00074">NLNET::CUdpSock::bind()</a>, and <a class="el" href="a06643.html#l00115">NLNET::CUdpSock::sendTo()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CTcpSockz2111_6" doxytag="NLNET::CTcpSock::setNoDelay" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CTcpSock::setNoDelay </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>value</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sets/unsets TCP_NODELAY (by default, it is off, i.e. the Nagle buffering algorithm is enabled). You must call this method *after* <a class="el" href="a02445.html#NLNET_1_1CTcpSockz2111_0">connect()</a>. +<p> +Reimplemented in <a class="el" href="a02443.html#NLNET_1_1CDummyTcpSocka7">NLNET::CDummyTcpSock</a>. +<p> +Definition at line <a class="el" href="a06487.html#l00146">146</a> of file <a class="el" href="a06487.html">tcp_sock.cpp</a>. +<p> +References <a class="el" href="a05646.html#l01132">value</a>. +<p> +Referenced by <a class="el" href="a05514.html#l00295">NLNET::CBufSock::connect()</a>, and <a class="el" href="a05512.html#l00779">NLNET::CListenTask::run()</a>. +<p> +<div class="fragment"><pre>00147 { +00148 <span class="keywordtype">int</span> b = <a class="code" href="a04223.html#a658">value</a>?1:0; +00149 <span class="keywordflow">if</span> ( setsockopt( _Sock, IPPROTO_TCP, TCP_NODELAY, (<span class="keywordtype">char</span>*)&b, <span class="keyword">sizeof</span>(b) ) != 0 ) +00150 { +00151 <span class="keywordflow">throw</span> ESocket( <span class="stringliteral">"setNoDelay failed"</span> ); +00152 } +00153 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2103_3" doxytag="NLNET::CTcpSock::setNonBlockingMode" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CSock::setNonBlockingMode </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>bm</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sets the socket in nonblocking mode. Call this method *after* <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2103_1">connect()</a>, otherwise you will get an "would block" error (10035 on Windows). In nonblocking mode, use received() and sent() instead of <a class="el" href="a02444.html#NLNET_1_1CTcpSockz2105_1">receive()</a> and <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2107_0">send()</a> +<p> +Referenced by <a class="el" href="a05515.html#l00286">NLNET::CNonBlockingBufSock::setNonBlocking()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSocka3" doxytag="NLNET::CTcpSock::setSendBufferSize" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CSock::setSendBufferSize </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a10">sint32</a> </td> + <td class="mdname1" valign="top" nowrap> <em>size</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sets the send buffer size. +<p> + </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSocka4" doxytag="NLNET::CTcpSock::setTimeOutValue" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CSock::setTimeOutValue </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">long </td> + <td class="mdname" nowrap> <em>sec</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>long </td> + <td class="mdname" nowrap> <em>ms</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Change the time out value used in getDataAvailable(), which is 0 by default. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00143">143</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +References <a class="el" href="a06405.html#l00309">NLNET::CSock::_TimeoutMs</a>, and <a class="el" href="a06405.html#l00306">NLNET::CSock::_TimeoutS</a>. +<p> +Referenced by <a class="el" href="a05506.html#l00437">NLNET::CClientReceiveTask::run()</a>. +<p> +<div class="fragment"><pre>00144 { +00145 <a class="code" href="a02444.html#NLNET_1_1CUdpSockp9">_TimeoutS</a> = sec; +00146 <a class="code" href="a02444.html#NLNET_1_1CUdpSockp8">_TimeoutMs</a> = ms; +00147 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CTcpSockz2111_7" doxytag="NLNET::CTcpSock::shutdownReceiving" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CTcpSock::shutdownReceiving </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Active disconnection for download way only (partial shutdown). +<p> + +<p> +Definition at line <a class="el" href="a06487.html#l00120">120</a> of file <a class="el" href="a06487.html">tcp_sock.cpp</a>. +<p> +<div class="fragment"><pre>00121 { +00122 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span> +00123 <span class="preprocessor"></span> ::shutdown( <a class="code" href="a02444.html#NLNET_1_1CUdpSockp7">_Sock</a>, SD_RECEIVE ); +00124 <span class="preprocessor">#elif defined NL_OS_UNIX</span> +00125 <span class="preprocessor"></span> ::shutdown( _Sock, SHUT_RD ); +00126 <span class="preprocessor">#endif</span> +00127 <span class="preprocessor"></span>} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CTcpSockz2111_8" doxytag="NLNET::CTcpSock::shutdownSending" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CTcpSock::shutdownSending </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Active disconnection for upload way only (partial shutdown). +<p> + +<p> +Definition at line <a class="el" href="a06487.html#l00133">133</a> of file <a class="el" href="a06487.html">tcp_sock.cpp</a>. +<p> +<div class="fragment"><pre>00134 { +00135 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span> +00136 <span class="preprocessor"></span> ::shutdown( <a class="code" href="a02444.html#NLNET_1_1CUdpSockp7">_Sock</a>, SD_SEND ); +00137 <span class="preprocessor">#elif defined NL_OS_UNIX</span> +00138 <span class="preprocessor"></span> ::shutdown( _Sock, SHUT_WR ); +00139 <span class="preprocessor">#endif</span> +00140 <span class="preprocessor"></span>} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockz2109_4" doxytag="NLNET::CTcpSock::timeOutValue" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> NLNET::CSock::timeOutValue </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the time out value in millisecond. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00244">244</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +References <a class="el" href="a06405.html#l00309">NLNET::CSock::_TimeoutMs</a>, <a class="el" href="a06405.html#l00306">NLNET::CSock::_TimeoutS</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>00244 { <span class="keywordflow">return</span> <a class="code" href="a02444.html#NLNET_1_1CUdpSockp9">_TimeoutS</a>*1000 + <a class="code" href="a02444.html#NLNET_1_1CUdpSockp8">_TimeoutMs</a>; } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLNET_1_1CUdpSockp0" doxytag="NLNET::CTcpSock::_BytesReceived" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a13">uint64</a> <a class="el" href="a02444.html#NLNET_1_1CUdpSockp0">NLNET::CSock::_BytesReceived</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Number of bytes received on this socket. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00300">300</a> of file <a class="el" href="a06405.html">sock.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockp1" doxytag="NLNET::CTcpSock::_BytesSent" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a13">uint64</a> <a class="el" href="a02444.html#NLNET_1_1CUdpSockp1">NLNET::CSock::_BytesSent</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Number of bytes sent on this socket. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00303">303</a> of file <a class="el" href="a06405.html">sock.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockp2" doxytag="NLNET::CTcpSock::_Connected" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> volatile bool <a class="el" href="a02444.html#NLNET_1_1CUdpSockp2">NLNET::CSock::_Connected</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +True after calling <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2103_1">connect()</a>. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00297">297</a> of file <a class="el" href="a06405.html">sock.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockp3" doxytag="NLNET::CTcpSock::_LocalAddr" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02665.html">CInetAddress</a> <a class="el" href="a02444.html#NLNET_1_1CUdpSockp3">NLNET::CSock::_LocalAddr</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Address of local host (valid if connected). +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00284">284</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +Referenced by <a class="el" href="a06405.html#l00235">NLNET::CSock::localAddr()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockp4" doxytag="NLNET::CTcpSock::_Logging" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool <a class="el" href="a02444.html#NLNET_1_1CUdpSockp4">NLNET::CSock::_Logging</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +If false, do not log any information. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00290">290</a> of file <a class="el" href="a06405.html">sock.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockp5" doxytag="NLNET::CTcpSock::_NonBlocking" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool <a class="el" href="a02444.html#NLNET_1_1CUdpSockp5">NLNET::CSock::_NonBlocking</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +If true, the socket is in nonblocking mode. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00293">293</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +Referenced by <a class="el" href="a06405.html#l00166">NLNET::CSock::nonBlockingMode()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockp6" doxytag="NLNET::CTcpSock::_RemoteAddr" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02665.html">CInetAddress</a> <a class="el" href="a02444.html#NLNET_1_1CUdpSockp6">NLNET::CSock::_RemoteAddr</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Address of the remote host (valid if connected). +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00287">287</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +Referenced by <a class="el" href="a06405.html#l00238">NLNET::CSock::remoteAddr()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockp7" doxytag="NLNET::CTcpSock::_Sock" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> SOCKET <a class="el" href="a02444.html#NLNET_1_1CUdpSockp7">NLNET::CSock::_Sock</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Socket descriptor. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00281">281</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +Referenced by <a class="el" href="a06405.html#l00241">NLNET::CSock::descriptor()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockp8" doxytag="NLNET::CTcpSock::_TimeoutMs" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> long <a class="el" href="a02444.html#NLNET_1_1CUdpSockp8">NLNET::CSock::_TimeoutMs</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Secondary time out value (ms) for select in <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2105_0">dataAvailable()</a>. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00309">309</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +Referenced by <a class="el" href="a06405.html#l00143">NLNET::CSock::setTimeOutValue()</a>, and <a class="el" href="a06405.html#l00244">NLNET::CSock::timeOutValue()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CUdpSockp9" doxytag="NLNET::CTcpSock::_TimeoutS" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> long <a class="el" href="a02444.html#NLNET_1_1CUdpSockp9">NLNET::CSock::_TimeoutS</a><code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Main time out value (sec) for select in <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2105_0">dataAvailable()</a>. +<p> + +<p> +Definition at line <a class="el" href="a06405.html#l00306">306</a> of file <a class="el" href="a06405.html">sock.h</a>. +<p> +Referenced by <a class="el" href="a06405.html#l00143">NLNET::CSock::setTimeOutValue()</a>, and <a class="el" href="a06405.html#l00244">NLNET::CSock::timeOutValue()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a06488.html">tcp_sock.h</a><li><a class="el" href="a06487.html">tcp_sock.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:04:48 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |