aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02302.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/a02302.html3227
1 files changed, 3227 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02302.html b/docs/doxygen/nel/a02302.html
new file mode 100644
index 00000000..9640cca3
--- /dev/null
+++ b/docs/doxygen/nel/a02302.html
@@ -0,0 +1,3227 @@
+<!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::CBufServer 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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NLNET::CBufServer Class Reference</h1><code>#include &lt;<a class="el" href="a05513.html">buf_server.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NLNET::CBufServer:
+<p><center><img src="a02302.png" usemap="#NLNET::CBufServer_map" border="0" alt=""></center>
+<map name="NLNET::CBufServer_map">
+<area href="a02296.html" alt="NLNET::CBufNetBase" shape="rect" coords="0,0,155,24">
+<area href="a02307.html" alt="NLNET::CCallbackServer" shape="rect" coords="0,112,155,136">
+</map>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Server class for layer 1<p>
+Listening socket and accepted connetions, with packet scheme. The provided buffers are sent raw (no endianness conversion). By default, the size time trigger is disabled, the time trigger is set to 20 ms.<p>
+Where do the methods take place: <a class="el" href="a02302.html#NLNET_1_1CBufServera20">send()</a>, -&gt; send buffer -&gt; <a class="el" href="a02302.html#NLNET_1_1CCallbackServera40">update()</a>, <a class="el" href="a02302.html#NLNET_1_1CBufServera8">flush()</a> <a class="el" href="a02302.html#NLNET_1_1CCallbackServera3">bytesSent()</a>, <a class="el" href="a02302.html#NLNET_1_1CCallbackServera29">newBytesSent()</a><p>
+<a class="el" href="a02302.html#NLNET_1_1CCallbackServera30">receive()</a>, <a class="el" href="a02302.html#NLNET_1_1CBufServera3">dataAvailable()</a>, &lt;- receive buffer &lt;- receive thread, <a class="el" href="a02302.html#NLNET_1_1CBufServera3">dataAvailable()</a>, <a class="el" href="a02302.html#NLNET_1_1CCallbackServera2">bytesReceived()</a>, <a class="el" href="a02302.html#NLNET_1_1CCallbackServera28">newBytesReceived()</a>, connection callback, disconnection callback <p>
+<dl compact><dt><b>Author:</b></dt><dd>Olivier Cado <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00156">156</a> of file <a class="el" href="a05513.html">buf_server.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServerw7">TEventType</a> { <a class="el" href="a02296.html#NLNET_1_1CCallbackServerw7NLNET_1_1CCallbackServerw10">User</a> = 'U',
+<a class="el" href="a02296.html#NLNET_1_1CCallbackServerw7NLNET_1_1CCallbackServerw0">Connection</a> = 'C',
+<a class="el" href="a02296.html#NLNET_1_1CCallbackServerw7NLNET_1_1CCallbackServerw1">Disconnection</a> = 'D'
+ }</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Type of incoming events (max 256). <a href="#NLNET_1_1CCallbackServerw7">More...</a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServerw9">TThreadStategy</a> { <a class="el" href="a02302.html#NLNET_1_1CCallbackServerw9NLNET_1_1CCallbackServerw6">SpreadSockets</a>,
+<a class="el" href="a02302.html#NLNET_1_1CCallbackServerw9NLNET_1_1CCallbackServerw2">FillThreads</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>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera2">bytesReceived</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of bytes popped by <a class="el" href="a02302.html#NLNET_1_1CCallbackServera30">receive()</a> since the beginning. <a href="#NLNET_1_1CCallbackServera2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera3">bytesSent</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of bytes pushed by <a class="el" href="a02302.html#NLNET_1_1CBufServera20">send()</a> since the beginning. <a href="#NLNET_1_1CCallbackServera3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServera2">CBufServer</a> (<a class="el" href="a02302.html#NLNET_1_1CCallbackServerw9">TThreadStategy</a> strategy=FillThreads, <a class="el" href="a04558.html#a9">uint16</a> max_threads=64, <a class="el" href="a04558.html#a9">uint16</a> max_sockets_per_thread=16, bool nodelay=true, bool replaymode=false)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServera3">dataAvailable</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera6">disconnect</a> (<a class="el" href="a02303.html">TSockId</a> hostid, bool quick=false)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CBufServera5">displayReceiveQueueStat</a> (<a class="el" href="a02813.html">NLMISC::CLog</a> *log=<a class="el" href="a05378.html#a12">NLMISC::InfoLog</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServera6">displaySendQueueStat</a> (<a class="el" href="a02813.html">NLMISC::CLog</a> *log=<a class="el" href="a05378.html#a12">NLMISC::InfoLog</a>, <a class="el" href="a02303.html">TSockId</a> destid=<a class="el" href="a05379.html#a75">InvalidSockId</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServera7">displayThreadStat</a> (<a class="el" href="a02813.html">NLMISC::CLog</a> *log=<a class="el" href="a05378.html#a12">NLMISC::InfoLog</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServera8">flush</a> (<a class="el" href="a02303.html">TSockId</a> destid)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CBufServera9">getReceiveQueueSize</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the size of the receive queue (mutexed). <a href="#NLNET_1_1CBufServera9"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera16">getSendQueueSize</a> (<a class="el" href="a02303.html">TSockId</a> destid)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02665.html">CInetAddress</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServera11">hostAddress</a> (<a class="el" href="a02303.html">TSockId</a> hostid)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the address of the specified host. <a href="#NLNET_1_1CBufServera11"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera22">init</a> (<a class="el" href="a04558.html#a9">uint16</a> port)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Listens on the specified port. <a href="#NLNET_1_1CCallbackServera22"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02665.html">CInetAddress</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera24">listenAddress</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the internet address of the listening socket. <a href="#NLNET_1_1CCallbackServera24"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServera25">maxExpectedBlockSize</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the max size of the received messages (default: 2^31-1). <a href="#NLNET_1_1CCallbackServera25"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServera26">maxSentBlockSize</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the max size of the sent messages (default: 2^31-1). <a href="#NLNET_1_1CCallbackServera26"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera27">nbConnections</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of connections (at the last <a class="el" href="a02302.html#NLNET_1_1CCallbackServera40">update()</a>). <a href="#NLNET_1_1CCallbackServera27"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera28">newBytesReceived</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of bytes popped by <a class="el" href="a02302.html#NLNET_1_1CCallbackServera30">receive()</a> since the previous call to this method. <a href="#NLNET_1_1CCallbackServera28"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera29">newBytesSent</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of bytes pushed by <a class="el" href="a02302.html#NLNET_1_1CBufServera20">send()</a> since the previous call to this method. <a href="#NLNET_1_1CCallbackServera29"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera30">receive</a> (<a class="el" href="a02271.html">NLMISC::CMemStream</a> &amp;<a class="el" href="a04223.html#a589">buffer</a>, <a class="el" href="a02303.html">TSockId</a> *hostid)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServera20">send</a> (const <a class="el" href="a02271.html">NLMISC::CMemStream</a> &amp;<a class="el" href="a04223.html#a589">buffer</a>, <a class="el" href="a02303.html">TSockId</a> hostid)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServera21">setConnectionCallback</a> (<a class="el" href="a05379.html#a76">TNetCallback</a> cb, void *arg)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets callback for incoming connections (or NULL to disable callback). <a href="#NLNET_1_1CBufServera21"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CBufServera22">setDisconnectionCallback</a> (<a class="el" href="a05379.html#a76">TNetCallback</a> cb, void *arg)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets callback for detecting a disconnection (or NULL to disable callback). <a href="#NLNET_1_1CBufServera22"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServera35">setMaxExpectedBlockSize</a> (<a class="el" href="a04558.html#a10">sint32</a> limit)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServera36">setMaxSentBlockSize</a> (<a class="el" href="a04558.html#a10">sint32</a> limit)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera38">setSizeFlushTrigger</a> (<a class="el" href="a02303.html">TSockId</a> destid, <a class="el" href="a04558.html#a10">sint32</a> <a class="el" href="a04223.html#a587">size</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera39">setTimeFlushTrigger</a> (<a class="el" href="a02303.html">TSockId</a> destid, <a class="el" href="a04558.html#a10">sint32</a> ms)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServera40">update</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update the network (call this method evenly). <a href="#NLNET_1_1CCallbackServera40"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServera28">~CBufServer</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#NLNET_1_1CBufServera28"></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&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServerb0">addNewThread</a> (<a class="el" href="a05379.html#a81">CThreadPool</a> &amp;threadpool, <a class="el" href="a03365.html">CServerBufSock</a> *bufsock)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServerb1">argOfConnectionCallback</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the argument of the connection callback. <a href="#NLNET_1_1CCallbackServerb1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServerb2">argOfDisconnectionCallback</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the argument of the disconnection callback. <a href="#NLNET_1_1CCallbackServerb2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05379.html#a76">TNetCallback</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServerb5">connectionCallback</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the connection callback. <a href="#NLNET_1_1CCallbackServerb5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>volatile bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServerb6">dataAvailableFlag</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return _DataAvailable. <a href="#NLNET_1_1CCallbackServerb6"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05379.html#a76">TNetCallback</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServerb7">disconnectionCallback</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the disconnection callback. <a href="#NLNET_1_1CCallbackServerb7"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServerb8">dispatchNewSocket</a> (<a class="el" href="a03365.html">CServerBufSock</a> *bufsock)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServerb9">noDelay</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the TCP_NODELAY flag. <a href="#NLNET_1_1CCallbackServerb9"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServerb11">pushBufferToHost</a> (const <a class="el" href="a02271.html">NLMISC::CMemStream</a> &amp;<a class="el" href="a04223.html#a589">buffer</a>, <a class="el" href="a02303.html">TSockId</a> hostid)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pushes a buffer to the specified host's send queue and update (unless not connected). <a href="#NLNET_1_1CCallbackServerb11"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServerb12">pushMessageIntoReceiveQueue</a> (const <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#a587">size</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServerb13">pushMessageIntoReceiveQueue</a> (const std::vector&lt; <a class="el" href="a04558.html#a7">uint8</a> &gt; &amp;<a class="el" href="a04223.html#a589">buffer</a>)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Push message into receive queue (mutexed). <a href="#NLNET_1_1CCallbackServerb13"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05379.html#a78">CSynchronizedFIFO</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServerb14">receiveQueue</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Access to the receive queue. <a href="#NLNET_1_1CCallbackServerb14"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03366.html">CServerReceiveTask</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a> (std::vector&lt; <a class="el" href="a03880.html">NLMISC::IThread</a> * &gt;::iterator ipt)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the receive task corresponding to a particular thread. <a href="#NLNET_1_1CCallbackServerb15"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServerb16">setDataAvailableFlag</a> (bool da)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets _DataAvailable. <a href="#NLNET_1_1CCallbackServerb16"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr0">_BytesPoppedIn</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of bytes popped by <a class="el" href="a02302.html#NLNET_1_1CCallbackServera30">receive()</a> since the beginning. <a href="#NLNET_1_1CBufServerr0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr1">_BytesPushedOut</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of bytes pushed by <a class="el" href="a02302.html#NLNET_1_1CBufServera20">send()</a> since the beginning. <a href="#NLNET_1_1CBufServerr1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05379.html#a76">TNetCallback</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr2">_ConnectionCallback</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Connection callback. <a href="#NLNET_1_1CBufServerr2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr3">_ConnectionCbArg</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Argument of the connection callback. <a href="#NLNET_1_1CBufServerr3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02770.html">CListenTask</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr4">_ListenTask</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Listen task. <a href="#NLNET_1_1CBufServerr4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03880.html">NLMISC::IThread</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr5">_ListenThread</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Listen thread. <a href="#NLNET_1_1CBufServerr5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr6">_MaxSocketsPerThread</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Max number of sockets handled by one thread. <a href="#NLNET_1_1CBufServerr6"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr7">_MaxThreads</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Max number of threads. <a href="#NLNET_1_1CBufServerr7"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr8">_NbConnections</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of connections (debug stat). <a href="#NLNET_1_1CBufServerr8"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr9">_NoDelay</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TCP_NODELAY. <a href="#NLNET_1_1CBufServerr9"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr10">_PrevBytesPoppedIn</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Previous number of bytes received. <a href="#NLNET_1_1CBufServerr10"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr11">_PrevBytesPushedOut</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Previous number of bytes sent. <a href="#NLNET_1_1CBufServerr11"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr12">_ReplayMode</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Replay mode flag. <a href="#NLNET_1_1CBufServerr12"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>NLMISC::CSynchronized&lt; <a class="el" href="a05379.html#a81">CThreadPool</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr13">_ThreadPool</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02302.html#NLNET_1_1CCallbackServerw9">TThreadStategy</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CBufServerr14">_ThreadStrategy</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Thread socket-handling strategy. <a href="#NLNET_1_1CBufServerr14"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServern1">CListenTask</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServern2">CServerBufSock</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02296.html#NLNET_1_1CCallbackServern4">NLNET::CBufSock</a></td></tr>
+
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NLNET_1_1CCallbackServerw7" doxytag="NLNET::CBufServer::TEventType" ></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="a02296.html#NLNET_1_1CCallbackServerw7">NLNET::CBufNetBase::TEventType</a><code> [inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Type of incoming events (max 256).
+<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_1CCallbackServerw7NLNET_1_1CCallbackServerw10" doxytag="User" ></a>User</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLNET_1_1CCallbackServerw7NLNET_1_1CCallbackServerw0" doxytag="Connection" ></a>Connection</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLNET_1_1CCallbackServerw7NLNET_1_1CCallbackServerw1" doxytag="Disconnection" ></a>Disconnection</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00079">79</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+<div class="fragment"><pre>00079 { <a class="code" href="a02296.html#NLNET_1_1CCallbackServerw7NLNET_1_1CCallbackServerw10">User</a> = <span class="charliteral">'U'</span>, <a class="code" href="a02296.html#NLNET_1_1CCallbackServerw7NLNET_1_1CCallbackServerw0">Connection</a> = <span class="charliteral">'C'</span>, <a class="code" href="a02296.html#NLNET_1_1CCallbackServerw7NLNET_1_1CCallbackServerw1">Disconnection</a> = <span class="charliteral">'D'</span> };
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerw9" doxytag="NLNET::CBufServer::TThreadStategy" ></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="a02302.html#NLNET_1_1CCallbackServerw9">NLNET::CBufServer::TThreadStategy</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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_1CCallbackServerw9NLNET_1_1CCallbackServerw6" doxytag="SpreadSockets" ></a>SpreadSockets</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLNET_1_1CCallbackServerw9NLNET_1_1CCallbackServerw2" doxytag="FillThreads" ></a>FillThreads</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00160">160</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+<div class="fragment"><pre>00160 { <a class="code" href="a02302.html#NLNET_1_1CCallbackServerw9NLNET_1_1CCallbackServerw6">SpreadSockets</a>, <a class="code" href="a02302.html#NLNET_1_1CCallbackServerw9NLNET_1_1CCallbackServerw2">FillThreads</a> };
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLNET_1_1CBufServera2" doxytag="NLNET::CBufServer::CBufServer" ></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::CBufServer::CBufServer </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02302.html#NLNET_1_1CCallbackServerw9">TThreadStategy</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>strategy</em> = FillThreads, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>max_threads</em> = 64, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>max_sockets_per_thread</em> = 16, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>nodelay</em> = true, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>replaymode</em> = false</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>
+Constructor Set nodelay to true to disable the Nagle buffering algorithm (see <a class="el" href="a02445.html">CTcpSock</a> documentation)
+<p>
+Definition at line <a class="el" href="a05512.html#l00058">58</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00335">_ListenTask</a>, <a class="el" href="a05513.html#l00338">_ListenThread</a>, <a class="el" href="a05513.html#l00370">_ReplayMode</a>, <a class="el" href="a05513.html#l00272">CListenTask</a>, <a class="el" href="a05515.html#l00040">nlnettrace</a>, and <a class="el" href="a05981.html#l00098">uint16</a>.
+<p>
+<div class="fragment"><pre>00059 :
+00060 <a class="code" href="a02296.html#NLNET_1_1CBufNetBaseb1">CBufNetBase</a>(),
+00061 <a class="code" href="a02302.html#NLNET_1_1CBufServerr9">_NoDelay</a>( nodelay ),
+00062 <a class="code" href="a02302.html#NLNET_1_1CBufServerr14">_ThreadStrategy</a>( strategy ),
+00063 <a class="code" href="a02302.html#NLNET_1_1CBufServerr7">_MaxThreads</a>( max_threads ),
+00064 <a class="code" href="a02302.html#NLNET_1_1CBufServerr6">_MaxSocketsPerThread</a>( max_sockets_per_thread ),
+00065 <a class="code" href="a02302.html#NLNET_1_1CBufServerr4">_ListenTask</a>( NULL ),
+00066 <a class="code" href="a02302.html#NLNET_1_1CBufServerr5">_ListenThread</a>( NULL ),
+00067 <a class="code" href="a02302.html#NLNET_1_1CBufServerr13">_ThreadPool</a>(<span class="stringliteral">"CBufServer::_ThreadPool"</span>),
+00068 <a class="code" href="a02302.html#NLNET_1_1CBufServerr2">_ConnectionCallback</a>( NULL ),
+00069 <a class="code" href="a02302.html#NLNET_1_1CBufServerr3">_ConnectionCbArg</a>( NULL ),
+00070 <a class="code" href="a02302.html#NLNET_1_1CBufServerr1">_BytesPushedOut</a>( 0 ),
+00071 <a class="code" href="a02302.html#NLNET_1_1CBufServerr0">_BytesPoppedIn</a>( 0 ),
+00072 <a class="code" href="a02302.html#NLNET_1_1CBufServerr10">_PrevBytesPoppedIn</a>( 0 ),
+00073 <a class="code" href="a02302.html#NLNET_1_1CBufServerr11">_PrevBytesPushedOut</a>( 0 ),
+00074 <a class="code" href="a02302.html#NLNET_1_1CBufServerr8">_NbConnections</a> (0),
+00075 <a class="code" href="a02302.html#NLNET_1_1CBufServerr12">_ReplayMode</a>( replaymode )
+00076 {
+00077 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"CBufServer::CBufServer"</span> );
+00078 <span class="keywordflow">if</span> ( ! <a class="code" href="a02302.html#NLNET_1_1CBufServerr12">_ReplayMode</a> )
+00079 {
+00080 <a class="code" href="a02302.html#NLNET_1_1CBufServerr4">_ListenTask</a> = <span class="keyword">new</span> <a class="code" href="a02302.html#NLNET_1_1CCallbackServern1">CListenTask</a>( <span class="keyword">this</span> );
+00081 <a class="code" href="a02302.html#NLNET_1_1CBufServerr5">_ListenThread</a> = IThread::create( _ListenTask );
+00082 }
+00083 <span class="comment">/*{</span>
+00084 <span class="comment"> CSynchronized&lt;uint32&gt;::CAccessor syncbpi ( &amp;_BytesPushedIn );</span>
+00085 <span class="comment"> syncbpi.value() = 0;</span>
+00086 <span class="comment"> }*/</span>
+00087 }
+
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera28" doxytag="NLNET::CBufServer::~CBufServer" ></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::CBufServer::~<a class="el" href="a02302.html">CBufServer</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Destructor.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05512.html#l00166">166</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00487">NLNET::CServerReceiveTask::_Connections</a>, <a class="el" href="a05513.html#l00335">_ListenTask</a>, <a class="el" href="a05513.html#l00338">_ListenThread</a>, <a class="el" href="a05513.html#l00370">_ReplayMode</a>, <a class="el" href="a05513.html#l00346">_ThreadPool</a>, <a class="el" href="a03880.html#NLMISC_1_1IThreada1">NLMISC::IThread::getRunnable()</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05515.html#l00040">nlnettrace</a>, <a class="el" href="a05513.html#l00284">receiveTask()</a>, <a class="el" href="a05513.html#l00056">NLNET::CServerTask::requireExit()</a>, and <a class="el" href="a03880.html#NLMISC_1_1IThreada6">NLMISC::IThread::wait()</a>.
+<p>
+<div class="fragment"><pre>00167 {
+00168 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"CBufServer::~CBufServer"</span> );
+00169
+00170 <span class="comment">// Clean listen thread exit</span>
+00171 <span class="keywordflow">if</span> ( ! <a class="code" href="a02302.html#NLNET_1_1CBufServerr12">_ReplayMode</a> )
+00172 {
+00173 ((<a class="code" href="a02302.html#NLNET_1_1CCallbackServern1">CListenTask</a>*)(<a class="code" href="a02302.html#NLNET_1_1CBufServerr5">_ListenThread</a>-&gt;<a class="code" href="a03880.html#NLMISC_1_1IThreada1">getRunnable</a>()))-&gt;requireExit();
+00174 ((<a class="code" href="a02302.html#NLNET_1_1CCallbackServern1">CListenTask</a>*)(<a class="code" href="a02302.html#NLNET_1_1CBufServerr5">_ListenThread</a>-&gt;<a class="code" href="a03880.html#NLMISC_1_1IThreada1">getRunnable</a>()))-&gt;close();
+00175 <span class="preprocessor">#ifdef NL_OS_UNIX</span>
+00176 <span class="preprocessor"></span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr4">_ListenTask</a>-&gt;wakeUp();
+00177 <span class="preprocessor">#endif</span>
+00178 <span class="preprocessor"></span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr5">_ListenThread</a>-&gt;<a class="code" href="a03880.html#NLMISC_1_1IThreada6">wait</a>();
+00179 <span class="keyword">delete</span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr5">_ListenThread</a>;
+00180 <span class="keyword">delete</span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr4">_ListenTask</a>;
+00181
+00182 <span class="comment">// Clean receive thread exits</span>
+00183 CThreadPool::iterator ipt;
+00184 {
+00185 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: Waiting for end of threads..."</span> );
+00186 CSynchronized&lt;CThreadPool&gt;::CAccessor poolsync( &amp;_ThreadPool );
+00187 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00188 {
+00189 <span class="comment">// Tell the threads to exit and wake them up</span>
+00190 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt);
+00191 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"Requiring exit"</span> );
+00192 task-&gt;requireExit();
+00193
+00194 <span class="comment">// Wake the threads up</span>
+00195 <span class="preprocessor"> #ifdef NL_OS_UNIX</span>
+00196 <span class="preprocessor"></span> task-&gt;wakeUp();
+00197 <span class="preprocessor"> #else</span>
+00198 <span class="preprocessor"></span> CConnections::iterator ipb;
+00199 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"Closing sockets (Win32)"</span> );
+00200 {
+00201 CSynchronized&lt;CConnections&gt;::CAccessor connectionssync( &amp;task-&gt;_Connections );
+00202 <span class="keywordflow">for</span> ( ipb=connectionssync.value().begin(); ipb!=connectionssync.value().end(); ++ipb )
+00203 {
+00204 (*ipb)-&gt;Sock-&gt;close();
+00205 }
+00206 }
+00207 <span class="preprocessor"> #endif</span>
+00208 <span class="preprocessor"></span>
+00209 }
+00210
+00211 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"Waiting"</span> );
+00212 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00213 {
+00214 <span class="comment">// Wait until the threads have exited</span>
+00215 (*ipt)-&gt;wait();
+00216 }
+00217
+00218 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: Deleting sockets, tasks and threads..."</span> );
+00219 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00220 {
+00221 <span class="comment">// Delete the socket objects</span>
+00222 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt);
+00223 CConnections::iterator ipb;
+00224 {
+00225 CSynchronized&lt;CConnections&gt;::CAccessor connectionssync( &amp;task-&gt;_Connections );
+00226 <span class="keywordflow">for</span> ( ipb=connectionssync.value().begin(); ipb!=connectionssync.value().end(); ++ipb )
+00227 {
+00228 <span class="keyword">delete</span> (*ipb); <span class="comment">// closes and deletes the socket</span>
+00229 }
+00230 }
+00231
+00232 <span class="comment">// Delete the task objects</span>
+00233 <span class="keyword">delete</span> task;
+00234
+00235 <span class="comment">// Delete the thread objects</span>
+00236 <span class="keyword">delete</span> (*ipt);
+00237 }
+00238 }
+00239 }
+00240
+00241 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"Exiting CBufServer::~CBufServer"</span> );
+00242 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLNET_1_1CCallbackServerb0" doxytag="NLNET::CBufServer::addNewThread" ></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::CBufServer::addNewThread </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a05379.html#a81">CThreadPool</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>threadpool</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03365.html">CServerBufSock</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>bufsock</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [protected]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05512.html#l00958">958</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00432">NLNET::CServerReceiveTask::addNewSocket()</a>, <a class="el" href="a05513.html#l00273">CServerReceiveTask</a>, <a class="el" href="a05513.html#l00115">NLNET::CThreadPool</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05515.html#l00040">nlnettrace</a>, and <a class="el" href="a05515.html#l00351">NLNET::CServerBufSock::setOwnerTask()</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00866">dispatchNewSocket()</a>.
+<p>
+<div class="fragment"><pre>00959 {
+00960 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"CBufServer::addNewThread"</span> );
+00961 <a class="code" href="a04199.html#a6">nlassert</a>( bufsock != NULL );
+00962
+00963 <span class="comment">// Create new task and dispatch the socket to it</span>
+00964 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <span class="keyword">new</span> <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a>( <span class="keyword">this</span> );
+00965 bufsock-&gt;setOwnerTask( task );
+00966 task-&gt;addNewSocket( bufsock );
+00967
+00968 <span class="comment">// Add a new thread to the pool, with this task</span>
+00969 IThread *thr = IThread::create( task );
+00970 {
+00971 threadpool.push_back( thr );
+00972 thr-&gt;start();
+00973 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: Added a new thread; pool size is %d"</span>, threadpool.size() );
+00974 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: New socket dispatched to thread %d"</span>, threadpool.size()-1 );
+00975 }
+00976 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb1" doxytag="NLNET::CBufServer::argOfConnectionCallback" ></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::CBufServer::argOfConnectionCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, protected]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the argument of the connection callback.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00314">314</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05513.html#l00352">_ConnectionCbArg</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00364">dataAvailable()</a>.
+<p>
+<div class="fragment"><pre>00314 { <span class="keywordflow">return</span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr3">_ConnectionCbArg</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb2" doxytag="NLNET::CBufServer::argOfDisconnectionCallback" ></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::CBufNetBase::argOfDisconnectionCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, protected, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the argument of the disconnection callback.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00160">160</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00220">NLNET::CBufNetBase::_DisconnectionCbArg</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00364">dataAvailable()</a>, and <a class="el" href="a05506.html#l00140">NLNET::CBufClient::dataAvailable()</a>.
+<p>
+<div class="fragment"><pre>00160 { <span class="keywordflow">return</span> _DisconnectionCbArg; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera2" doxytag="NLNET::CBufServer::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::CBufServer::bytesReceived </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the number of bytes popped by <a class="el" href="a02302.html#NLNET_1_1CCallbackServera30">receive()</a> since the beginning.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00255">255</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05513.html#l00358">_BytesPoppedIn</a>, and <a class="el" href="a05981.html#l00102">uint64</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00749">newBytesReceived()</a>.
+<p>
+<div class="fragment"><pre>00255 { <span class="keywordflow">return</span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr0">_BytesPoppedIn</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera3" doxytag="NLNET::CBufServer::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::CBufServer::bytesSent </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the number of bytes pushed by <a class="el" href="a02302.html#NLNET_1_1CBufServera20">send()</a> since the beginning.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00261">261</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05513.html#l00355">_BytesPushedOut</a>, and <a class="el" href="a05981.html#l00102">uint64</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00761">newBytesSent()</a>.
+<p>
+<div class="fragment"><pre>00261 { <span class="keywordflow">return</span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr1">_BytesPushedOut</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb5" doxytag="NLNET::CBufServer::connectionCallback" ></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="a05379.html#a76">TNetCallback</a> NLNET::CBufServer::connectionCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, protected]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the connection callback.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00311">311</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05513.html#l00349">_ConnectionCallback</a>, and <a class="el" href="a05511.html#l00047">NLNET::TNetCallback</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00364">dataAvailable()</a>.
+<p>
+<div class="fragment"><pre>00311 { <span class="keywordflow">return</span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr2">_ConnectionCallback</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera3" doxytag="NLNET::CBufServer::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::CBufServer::dataAvailable </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Checks if there is some data to receive. Returns false if the receive queue is empty. This is where the connection/disconnection callbacks can be called.
+<p>
+Reimplemented in <a class="el" href="a02307.html#NLNET_1_1CCallbackServerd0">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05512.html#l00364">364</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00314">argOfConnectionCallback()</a>, <a class="el" href="a05511.html#l00160">NLNET::CBufNetBase::argOfDisconnectionCallback()</a>, <a class="el" href="a05514.html#l00329">NLNET::CBufSock::asString()</a>, <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05511.html#l00056">NLNET::CFifoAccessor</a>, <a class="el" href="a05513.html#l00311">connectionCallback()</a>, <a class="el" href="a05511.html#l00206">NLNET::CBufNetBase::dataAvailableFlag()</a>, <a class="el" href="a05511.html#l00157">NLNET::CBufNetBase::disconnectionCallback()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05622.html#l00154">nlerror</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, <a class="el" href="a05511.html#l00154">NLNET::CBufNetBase::receiveQueue()</a>, <a class="el" href="a05515.html#l00234">NLNET::CBufSock::setConnectedState()</a>, <a class="el" href="a05511.html#l00203">NLNET::CBufNetBase::setDataAvailableFlag()</a>, <a class="el" href="a05586.html#l00107">NLMISC::stringFromVector()</a>, <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>, <a class="el" href="a05981.html#l00098">uint16</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00365 {
+00366 <span class="comment">// slow down the layer H_AUTO (CBufServer_dataAvailable);</span>
+00367 {
+00368 <span class="comment">/* If no data available, enter the 'while' loop and return false (1 volatile test)</span>
+00369 <span class="comment"> * If there are user data available, enter the 'while' and return true immediately (1 volatile test + 1 short locking)</span>
+00370 <span class="comment"> * If there is a connection/disconnection event (rare), call the callback and loop</span>
+00371 <span class="comment"> */</span>
+00372 <span class="keywordflow">while</span> ( <a class="code" href="a02296.html#NLNET_1_1CCallbackServerb6">dataAvailableFlag</a>() )
+00373 {
+00374 <span class="comment">// Because _DataAvailable is true, the receive queue is not empty at this point</span>
+00375 vector&lt;uint8&gt; <a class="code" href="a04223.html#a589">buffer</a>;
+00376 <a class="code" href="a04558.html#a7">uint8</a> val;
+00377 {
+00378 <a class="code" href="a05379.html#a79">CFifoAccessor</a> recvfifo( &amp;<a class="code" href="a02296.html#NLNET_1_1CCallbackServerb14">receiveQueue</a>() );
+00379 val = recvfifo.value().frontLast();
+00380 <span class="keywordflow">if</span> ( val != CBufNetBase::User )
+00381 {
+00382 recvfifo.value().front( buffer );
+00383 }
+00384 }
+00385
+00386 <span class="comment">/*sint32 mbsize = recvfifo.value().size() / 1048576;</span>
+00387 <span class="comment"> if ( mbsize &gt; 0 )</span>
+00388 <span class="comment"> {</span>
+00389 <span class="comment"> nlwarning( "The receive queue size exceeds %d MB", mbsize );</span>
+00390 <span class="comment"> }*/</span>
+00391
+00392 <span class="comment">/*vector&lt;uint8&gt; buffer;</span>
+00393 <span class="comment"> recvfifo.value().front( buffer );*/</span>
+00394
+00395 <span class="comment">// Test if it the next block is a system event</span>
+00396 <span class="comment">//switch ( buffer[buffer.size()-1] )</span>
+00397 <span class="keywordflow">switch</span> ( val )
+00398 {
+00399
+00400 <span class="comment">// Normal message available</span>
+00401 <span class="keywordflow">case</span> CBufNetBase::User:
+00402 <span class="keywordflow">return</span> <span class="keyword">true</span>; <span class="comment">// return immediatly, do not extract the message</span>
+00403
+00404 <span class="comment">// Process disconnection event</span>
+00405 <span class="keywordflow">case</span> CBufNetBase::Disconnection:
+00406 {
+00407 <a class="code" href="a05379.html#a74">TSockId</a> sockid = *((<a class="code" href="a05379.html#a74">TSockId</a>*)(&amp;*<a class="code" href="a04223.html#a589">buffer</a>.begin()));
+00408 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: Disconnection event for %p %s"</span>, sockid, sockid-&gt;asString().c_str());
+00409
+00410 sockid-&gt;setConnectedState( <span class="keyword">false</span> );
+00411
+00412 <span class="comment">// Call callback if needed</span>
+00413 <span class="keywordflow">if</span> ( <a class="code" href="a02296.html#NLNET_1_1CCallbackServerb7">disconnectionCallback</a>() != NULL )
+00414 {
+00415 <a class="code" href="a02296.html#NLNET_1_1CCallbackServerb7">disconnectionCallback</a>()( sockid, <a class="code" href="a02296.html#NLNET_1_1CCallbackServerb2">argOfDisconnectionCallback</a>() );
+00416 }
+00417
+00418 <span class="comment">// Add socket object into the synchronized remove list</span>
+00419 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: Adding the connection to the remove list"</span> );
+00420 <a class="code" href="a04199.html#a6">nlassert</a>( ((CServerBufSock*)sockid)-&gt;ownerTask() != NULL );
+00421 ((<a class="code" href="a02302.html#NLNET_1_1CCallbackServern2">CServerBufSock</a>*)sockid)-&gt;ownerTask()-&gt;addToRemoveSet( sockid );
+00422 <span class="keywordflow">break</span>;
+00423 }
+00424 <span class="comment">// Process connection event</span>
+00425 <span class="keywordflow">case</span> CBufNetBase::Connection:
+00426 {
+00427 <a class="code" href="a05379.html#a74">TSockId</a> sockid = *((<a class="code" href="a05379.html#a74">TSockId</a>*)(&amp;*<a class="code" href="a04223.html#a589">buffer</a>.begin()));
+00428 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: Connection event for %p %s"</span>, sockid, sockid-&gt;asString().c_str());
+00429
+00430 sockid-&gt;setConnectedState( <span class="keyword">true</span> );
+00431
+00432 <span class="comment">// Call callback if needed</span>
+00433 <span class="keywordflow">if</span> ( <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb5">connectionCallback</a>() != NULL )
+00434 {
+00435 <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb5">connectionCallback</a>()( sockid, <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb1">argOfConnectionCallback</a>() );
+00436 }
+00437 <span class="keywordflow">break</span>;
+00438 }
+00439 <span class="keywordflow">default</span>: <span class="comment">// should not occur</span>
+00440 <a class="code" href="a04199.html#a1">nlinfo</a>( <span class="stringliteral">"LNETL1: Invalid block type: %hu (should be = to %hu"</span>, (<a class="code" href="a04558.html#a9">uint16</a>)(buffer[<a class="code" href="a04223.html#a589">buffer</a>.size()-1]), (<a class="code" href="a04558.html#a9">uint16</a>)(val) );
+00441 <a class="code" href="a04199.html#a1">nlinfo</a>( <span class="stringliteral">"LNETL1: Buffer (%d B): [%s]"</span>, <a class="code" href="a04223.html#a589">buffer</a>.size(), <a class="code" href="a05378.html#a258">stringFromVector</a>(buffer).c_str() );
+00442 <a class="code" href="a04199.html#a1">nlinfo</a>( <span class="stringliteral">"LNETL1: Receive queue:"</span> );
+00443 {
+00444 <a class="code" href="a05379.html#a79">CFifoAccessor</a> recvfifo( &amp;<a class="code" href="a02296.html#NLNET_1_1CCallbackServerb14">receiveQueue</a>() );
+00445 recvfifo.value().display();
+00446 }
+00447 <a class="code" href="a04199.html#a3">nlerror</a>( <span class="stringliteral">"LNETL1: Invalid system event type in server receive queue"</span> );
+00448
+00449 }
+00450
+00451 <span class="comment">// Extract system event</span>
+00452 {
+00453 <a class="code" href="a05379.html#a79">CFifoAccessor</a> recvfifo( &amp;<a class="code" href="a02296.html#NLNET_1_1CCallbackServerb14">receiveQueue</a>() );
+00454 recvfifo.value().pop();
+00455 <a class="code" href="a02296.html#NLNET_1_1CCallbackServerb16">setDataAvailableFlag</a>( ! recvfifo.value().empty() );
+00456 }
+00457 }
+00458 <span class="comment">// _DataAvailable is false here</span>
+00459 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00460 }
+00461 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb6" doxytag="NLNET::CBufServer::dataAvailableFlag" ></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 NLNET::CBufNetBase::dataAvailableFlag </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, protected, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Return _DataAvailable.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00206">206</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00214">NLNET::CBufNetBase::_DataAvailable</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00364">dataAvailable()</a>, and <a class="el" href="a05506.html#l00140">NLNET::CBufClient::dataAvailable()</a>.
+<p>
+<div class="fragment"><pre>00206 { <span class="keywordflow">return</span> _DataAvailable; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera6" doxytag="NLNET::CBufServer::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::CBufServer::disconnect </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02303.html">TSockId</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>hostid</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>quick</em> = false</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>
+Disconnect a connection Set hostid to InvalidSockId to disconnect all connections. If hostid is not InvalidSockId and the socket is not connected, the method does nothing. If quick is true, any pending data will not be sent before disconnecting.
+<p>
+Definition at line <a class="el" href="a05512.html#l00251">251</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00487">NLNET::CServerReceiveTask::_Connections</a>, <a class="el" href="a05513.html#l00346">_ThreadPool</a>, <a class="el" href="a02444.html#NLNET_1_1CUdpSockz2109_0">NLNET::CSock::connected()</a>, <a class="el" href="a06487.html#l00101">NLNET::CTcpSock::disconnect()</a>, <a class="el" href="a05514.html#l00137">NLNET::CBufSock::flush()</a>, <a class="el" href="a05515.html#l00040">nlnettrace</a>, <a class="el" href="a05513.html#l00284">receiveTask()</a>, <a class="el" href="a05515.html#l00243">NLNET::CBufSock::Sock</a>, and <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>.
+<p>
+<div class="fragment"><pre>00252 {
+00253 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"CBufServer::disconnect"</span> );
+00254 <span class="keywordflow">if</span> ( hostid != InvalidSockId )
+00255 {
+00256 <span class="comment">// Disconnect only if physically connected</span>
+00257 <span class="keywordflow">if</span> ( hostid-&gt;Sock-&gt;connected() )
+00258 {
+00259 <span class="keywordflow">if</span> ( ! quick )
+00260 {
+00261 hostid-&gt;flush();
+00262 }
+00263 hostid-&gt;Sock-&gt;disconnect(); <span class="comment">// the connection will be removed by the next call of update()</span>
+00264 }
+00265 }
+00266 <span class="keywordflow">else</span>
+00267 {
+00268 <span class="comment">// Disconnect all</span>
+00269 CThreadPool::iterator ipt;
+00270 {
+00271 CSynchronized&lt;CThreadPool&gt;::CAccessor poolsync( &amp;_ThreadPool );
+00272 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00273 {
+00274 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt);
+00275 CConnections::iterator ipb;
+00276 {
+00277 CSynchronized&lt;CConnections&gt;::CAccessor connectionssync( &amp;task-&gt;_Connections );
+00278 <span class="keywordflow">for</span> ( ipb=connectionssync.value().begin(); ipb!=connectionssync.value().end(); ++ipb )
+00279 {
+00280 <span class="keywordflow">if</span> ( (*ipb)-&gt;Sock-&gt;connected() )
+00281 {
+00282 <span class="keywordflow">if</span> ( ! quick )
+00283 {
+00284 (*ipb)-&gt;flush();
+00285 }
+00286 (*ipb)-&gt;Sock-&gt;disconnect();
+00287 }
+00288 }
+00289 }
+00290 }
+00291 }
+00292 }
+00293 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb7" doxytag="NLNET::CBufServer::disconnectionCallback" ></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="a05379.html#a76">TNetCallback</a> NLNET::CBufNetBase::disconnectionCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, protected, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the disconnection callback.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00157">157</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00217">NLNET::CBufNetBase::_DisconnectionCallback</a>, and <a class="el" href="a05511.html#l00047">NLNET::TNetCallback</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00364">dataAvailable()</a>, and <a class="el" href="a05506.html#l00140">NLNET::CBufClient::dataAvailable()</a>.
+<p>
+<div class="fragment"><pre>00157 { <span class="keywordflow">return</span> _DisconnectionCallback; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb8" doxytag="NLNET::CBufServer::dispatchNewSocket" ></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::CBufServer::dispatchNewSocket </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03365.html">CServerBufSock</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>bufsock</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [protected]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Binds a new socket and send buffer to an existing or a new thread (that starts) Note: this method is called in the listening thread.
+<p>
+Definition at line <a class="el" href="a05512.html#l00866">866</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00332">_MaxSocketsPerThread</a>, <a class="el" href="a05513.html#l00329">_MaxThreads</a>, <a class="el" href="a05513.html#l00346">_ThreadPool</a>, <a class="el" href="a05513.html#l00326">_ThreadStrategy</a>, <a class="el" href="a05513.html#l00432">NLNET::CServerReceiveTask::addNewSocket()</a>, <a class="el" href="a05512.html#l00958">addNewThread()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05515.html#l00040">nlnettrace</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05513.html#l00421">NLNET::CServerReceiveTask::numberOfConnections()</a>, <a class="el" href="a05513.html#l00284">receiveTask()</a>, <a class="el" href="a05515.html#l00351">NLNET::CServerBufSock::setOwnerTask()</a>, <a class="el" href="a02302.html#NLNET_1_1CCallbackServerw9NLNET_1_1CCallbackServerw6">SpreadSockets</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00779">NLNET::CListenTask::run()</a>.
+<p>
+<div class="fragment"><pre>00867 {
+00868 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"CBufServer::dispatchNewSocket"</span> );
+00869
+00870 CSynchronized&lt;CThreadPool&gt;::CAccessor poolsync( &amp;_ThreadPool );
+00871 <span class="keywordflow">if</span> ( <a class="code" href="a02302.html#NLNET_1_1CBufServerr14">_ThreadStrategy</a> == <a class="code" href="a02302.html#NLNET_1_1CCallbackServerw9NLNET_1_1CCallbackServerw6">SpreadSockets</a> )
+00872 {
+00873 <span class="comment">// Find the thread with the smallest number of connections and check if all</span>
+00874 <span class="comment">// threads do not have the same number of connections</span>
+00875 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04061.html#a0">min</a> = 0xFFFFFFFF;
+00876 <a class="code" href="a04558.html#a15">uint</a> max = 0;
+00877 CThreadPool::iterator ipt, iptmin, iptmax;
+00878 <span class="keywordflow">for</span> ( iptmin=iptmax=ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00879 {
+00880 <a class="code" href="a04558.html#a15">uint</a> noc = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt)-&gt;numberOfConnections();
+00881 <span class="keywordflow">if</span> ( noc &lt; <a class="code" href="a04061.html#a0">min</a> )
+00882 {
+00883 <a class="code" href="a04061.html#a0">min</a> = noc;
+00884 iptmin = ipt;
+00885 }
+00886 <span class="keywordflow">if</span> ( noc &gt; max )
+00887 {
+00888 max = noc;
+00889 iptmax = ipt;
+00890 }
+00891 }
+00892
+00893 <span class="comment">// Check if we make the pool of threads grow (if we have not found vacant room</span>
+00894 <span class="comment">// and if it is allowed to)</span>
+00895 <span class="keywordflow">if</span> ( (poolsync.value().empty()) ||
+00896 ((<a class="code" href="a04061.html#a0">min</a> == max) &amp;&amp; (poolsync.value().size() &lt; <a class="code" href="a02302.html#NLNET_1_1CBufServerr7">_MaxThreads</a>)) )
+00897 {
+00898 <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb0">addNewThread</a>( poolsync.value(), bufsock );
+00899 }
+00900 <span class="keywordflow">else</span>
+00901 {
+00902 <span class="comment">// Dispatch socket to an existing thread of the pool</span>
+00903 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(iptmin);
+00904 bufsock-&gt;setOwnerTask( task );
+00905 task-&gt;addNewSocket( bufsock );
+00906 <span class="preprocessor">#ifdef NL_OS_UNIX</span>
+00907 <span class="preprocessor"></span> task-&gt;wakeUp();
+00908 <span class="preprocessor">#endif </span>
+00909 <span class="preprocessor"></span>
+00910 <span class="keywordflow">if</span> ( <a class="code" href="a04061.html#a0">min</a> &gt;= (<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a02302.html#NLNET_1_1CBufServerr6">_MaxSocketsPerThread</a> )
+00911 {
+00912 <a class="code" href="a04199.html#a2">nlwarning</a>( <span class="stringliteral">"LNETL1: Exceeding the maximum number of sockets per thread"</span> );
+00913 }
+00914 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: New socket dispatched to thread %d"</span>, iptmin-poolsync.value().begin() );
+00915 }
+00916
+00917 }
+00918 <span class="keywordflow">else</span> <span class="comment">// _ThreadStrategy == FillThreads</span>
+00919 {
+00920 CThreadPool::iterator ipt;
+00921 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00922 {
+00923 <a class="code" href="a04558.html#a15">uint</a> noc = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt)-&gt;numberOfConnections();
+00924 <span class="keywordflow">if</span> ( noc &lt; <a class="code" href="a02302.html#NLNET_1_1CBufServerr6">_MaxSocketsPerThread</a> )
+00925 {
+00926 <span class="keywordflow">break</span>;
+00927 }
+00928 }
+00929
+00930 <span class="comment">// Check if we have to make the thread pool grow (if we have not found vacant room)</span>
+00931 <span class="keywordflow">if</span> ( ipt == poolsync.value().end() )
+00932 {
+00933 <span class="keywordflow">if</span> ( poolsync.value().size() == <a class="code" href="a02302.html#NLNET_1_1CBufServerr7">_MaxThreads</a> )
+00934 {
+00935 <a class="code" href="a04199.html#a2">nlwarning</a>( <span class="stringliteral">"LNETL1: Exceeding the maximum number of threads"</span> );
+00936 }
+00937 <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb0">addNewThread</a>( poolsync.value(), bufsock );
+00938 }
+00939 <span class="keywordflow">else</span>
+00940 {
+00941 <span class="comment">// Dispatch socket to an existing thread of the pool</span>
+00942 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt);
+00943 bufsock-&gt;setOwnerTask( task );
+00944 task-&gt;addNewSocket( bufsock );
+00945 <span class="preprocessor">#ifdef NL_OS_UNIX</span>
+00946 <span class="preprocessor"></span> task-&gt;wakeUp();
+00947 <span class="preprocessor">#endif </span>
+00948 <span class="preprocessor"></span> <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: New socket dispatched to thread %d"</span>, ipt-poolsync.value().begin() );
+00949 }
+00950 }
+00951 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera5" doxytag="NLNET::CBufServer::displayReceiveQueueStat" ></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::CBufNetBase::displayReceiveQueueStat </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02813.html">NLMISC::CLog</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>log</em> = <a class="el" href="a05378.html#a12">NLMISC::InfoLog</a> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Reimplemented in <a class="el" href="a02305.html#NLNET_1_1CCallbackClienta10">NLNET::CCallbackClient</a>, and <a class="el" href="a02307.html#NLNET_1_1CCallbackServera9">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05511.html#l00094">94</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00211">NLNET::CBufNetBase::_RecvFifo</a>, and <a class="el" href="a05511.html#l00056">NLNET::CFifoAccessor</a>.
+<p>
+<div class="fragment"><pre>00095 {
+00096 <a class="code" href="a05379.html#a79">CFifoAccessor</a> syncfifo( &amp;_RecvFifo );
+00097 syncfifo.value().displayStats(log);
+00098 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera6" doxytag="NLNET::CBufServer::displaySendQueueStat" ></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::CBufServer::displaySendQueueStat </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02813.html">NLMISC::CLog</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>log</em> = <a class="el" href="a05378.html#a12">NLMISC::InfoLog</a>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02303.html">TSockId</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>destid</em> = <a class="el" href="a05379.html#a75">InvalidSockId</a></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>
+
+<p>
+Reimplemented in <a class="el" href="a02307.html#NLNET_1_1CCallbackServera10">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05512.html#l00713">713</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00487">NLNET::CServerReceiveTask::_Connections</a>, <a class="el" href="a05513.html#l00346">_ThreadPool</a>, <a class="el" href="a05508.html#l00528">NLMISC::CBufFIFO::displayStats()</a>, <a class="el" href="a05513.html#l00284">receiveTask()</a>, <a class="el" href="a05515.html#l00240">NLNET::CBufSock::SendFifo</a>, and <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>.
+<p>
+<div class="fragment"><pre>00714 {
+00715 <span class="keywordflow">if</span> ( destid != InvalidSockId )
+00716 {
+00717 destid-&gt;SendFifo.displayStats(log);
+00718 }
+00719 <span class="keywordflow">else</span>
+00720 {
+00721 <span class="comment">// add all client buffers</span>
+00722
+00723 <span class="comment">// For each thread</span>
+00724 CThreadPool::iterator ipt;
+00725 {
+00726 CSynchronized&lt;CThreadPool&gt;::CAccessor poolsync( &amp;_ThreadPool );
+00727 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00728 {
+00729 <span class="comment">// For each thread of the pool</span>
+00730 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt);
+00731 CConnections::iterator ipb;
+00732 {
+00733 CSynchronized&lt;CConnections&gt;::CAccessor connectionssync( &amp;task-&gt;_Connections );
+00734 <span class="keywordflow">for</span> ( ipb=connectionssync.value().begin(); ipb!=connectionssync.value().end(); ++ipb )
+00735 {
+00736 <span class="comment">// For each socket of the thread, update sending</span>
+00737 (*ipb)-&gt;SendFifo.displayStats(log);
+00738 }
+00739 }
+00740 }
+00741 }
+00742 }
+00743 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera7" doxytag="NLNET::CBufServer::displayThreadStat" ></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::CBufServer::displayThreadStat </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02813.html">NLMISC::CLog</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>log</em> = <a class="el" href="a05378.html#a12">NLMISC::InfoLog</a> </td>
+ <td class="md" valign="top">&nbsp;)&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>
+
+<p>
+Reimplemented in <a class="el" href="a02307.html#NLNET_1_1CCallbackServera11">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05512.html#l00695">695</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00335">_ListenTask</a>, <a class="el" href="a05513.html#l00346">_ThreadPool</a>, <a class="el" href="a05943.html#l00323">NLMISC::CLog::displayNL()</a>, <a class="el" href="a05513.html#l00063">NLNET::CServerTask::NbLoop</a>, and <a class="el" href="a05513.html#l00284">receiveTask()</a>.
+<p>
+<div class="fragment"><pre>00696 {
+00697 <span class="comment">// For each thread</span>
+00698 CThreadPool::iterator ipt;
+00699 {
+00700 CSynchronized&lt;CThreadPool&gt;::CAccessor poolsync( &amp;_ThreadPool );
+00701 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00702 {
+00703 <span class="comment">// For each thread of the pool</span>
+00704 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt);
+00705 <span class="comment">// For each socket of the thread, update sending</span>
+00706 log-&gt;<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a> (<span class="stringliteral">"server receive thread %p nbloop %d"</span>, task, task-&gt;NbLoop);
+00707 }
+00708 }
+00709
+00710 log-&gt;<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a> (<span class="stringliteral">"server listen thread %p nbloop %d"</span>, _ListenTask, <a class="code" href="a02302.html#NLNET_1_1CBufServerr4">_ListenTask</a>-&gt;NbLoop);
+00711 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera8" doxytag="NLNET::CBufServer::flush" ></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::CBufServer::flush </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02303.html">TSockId</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>destid</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Force to send all data pending in the send queue. <dl compact><dt><b>Returns:</b></dt><dd>False if an error has occured (e.g. the remote host is disconnected). To retrieve the reason of the error, call <a class="el" href="a02444.html#NLNET_1_1CUdpSocke1">CSock::getLastError()</a> and/or <a class="el" href="a02444.html#NLNET_1_1CUdpSocke0">CSock::errorString()</a></dd></dl>
+
+<p>
+Reimplemented in <a class="el" href="a02307.html#NLNET_1_1CCallbackServera12">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05513.html#l00232">232</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05514.html#l00137">NLNET::CBufSock::flush()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>.
+<p>
+<div class="fragment"><pre>00232 { <a class="code" href="a04199.html#a6">nlassert</a>( destid != InvalidSockId ); <span class="keywordflow">return</span> destid-&gt;flush(); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera9" doxytag="NLNET::CBufServer::getReceiveQueueSize" ></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::CBufNetBase::getReceiveQueueSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the size of the receive queue (mutexed).
+<p>
+
+<p>
+Reimplemented in <a class="el" href="a02305.html#NLNET_1_1CCallbackClienta18">NLNET::CCallbackClient</a>, and <a class="el" href="a02307.html#NLNET_1_1CCallbackServera15">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05511.html#l00088">88</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00211">NLNET::CBufNetBase::_RecvFifo</a>, <a class="el" href="a05511.html#l00056">NLNET::CFifoAccessor</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00089 {
+00090 <a class="code" href="a05379.html#a79">CFifoAccessor</a> syncfifo( &amp;_RecvFifo );
+00091 <span class="keywordflow">return</span> syncfifo.value().size();
+00092 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera16" doxytag="NLNET::CBufServer::getSendQueueSize" ></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::CBufServer::getSendQueueSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02303.html">TSockId</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>destid</em> </td>
+ <td class="md" valign="top">&nbsp;)&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>
+
+<p>
+Definition at line <a class="el" href="a05512.html#l00660">660</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00487">NLNET::CServerReceiveTask::_Connections</a>, <a class="el" href="a05513.html#l00346">_ThreadPool</a>, <a class="el" href="a05513.html#l00284">receiveTask()</a>, <a class="el" href="a05515.html#l00240">NLNET::CBufSock::SendFifo</a>, <a class="el" href="a05508.html#l00410">NLMISC::CBufFIFO::size()</a>, <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00661 {
+00662 <span class="keywordflow">if</span> ( destid != InvalidSockId )
+00663 {
+00664 <span class="keywordflow">return</span> destid-&gt;SendFifo.size();
+00665 }
+00666 <span class="keywordflow">else</span>
+00667 {
+00668 <span class="comment">// add all client buffers</span>
+00669
+00670 <a class="code" href="a04558.html#a11">uint32</a> total = 0;
+00671
+00672 <span class="comment">// For each thread</span>
+00673 CThreadPool::iterator ipt;
+00674 {
+00675 CSynchronized&lt;CThreadPool&gt;::CAccessor poolsync( &amp;_ThreadPool );
+00676 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00677 {
+00678 <span class="comment">// For each thread of the pool</span>
+00679 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt);
+00680 CConnections::iterator ipb;
+00681 {
+00682 CSynchronized&lt;CConnections&gt;::CAccessor connectionssync( &amp;task-&gt;_Connections );
+00683 <span class="keywordflow">for</span> ( ipb=connectionssync.value().begin(); ipb!=connectionssync.value().end(); ++ipb )
+00684 {
+00685 <span class="comment">// For each socket of the thread, update sending</span>
+00686 total = (*ipb)-&gt;SendFifo.size ();
+00687 }
+00688 }
+00689 }
+00690 }
+00691 <span class="keywordflow">return</span> total;
+00692 }
+00693 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera11" doxytag="NLNET::CBufServer::hostAddress" ></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>&amp; NLNET::CBufServer::hostAddress </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02303.html">TSockId</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>hostid</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the address of the specified host.
+<p>
+
+<p>
+Reimplemented in <a class="el" href="a02307.html#NLNET_1_1CCallbackServera20">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05513.html#l00241">241</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06405.html#l00238">NLNET::CSock::remoteAddr()</a>, <a class="el" href="a05515.html#l00243">NLNET::CBufSock::Sock</a>, and <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>.
+<p>
+<div class="fragment"><pre>00241 { <a class="code" href="a04199.html#a6">nlassert</a>( hostid != InvalidSockId ); <span class="keywordflow">return</span> hostid-&gt;Sock-&gt;remoteAddr(); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera22" doxytag="NLNET::CBufServer::init" ></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::CBufServer::init </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>port</em> </td>
+ <td class="md" valign="top">&nbsp;)&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>
+Listens on the specified port.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05512.html#l00093">93</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00335">_ListenTask</a>, <a class="el" href="a05513.html#l00338">_ListenThread</a>, <a class="el" href="a05513.html#l00370">_ReplayMode</a>, <a class="el" href="a05512.html#l00111">NLNET::CListenTask::init()</a>, <a class="el" href="a05511.html#l00135">NLNET::CBufNetBase::maxExpectedBlockSize()</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05515.html#l00040">nlnettrace</a>, <a class="el" href="a03880.html#NLMISC_1_1IThreada4">NLMISC::IThread::start()</a>, and <a class="el" href="a05981.html#l00098">uint16</a>.
+<p>
+Referenced by <a class="el" href="a06098.html#l00207">NLNET::CNetManager::addServer()</a>, and <a class="el" href="a06645.html#l00479">NLNET::CUnifiedNetwork::init()</a>.
+<p>
+<div class="fragment"><pre>00094 {
+00095 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"CBufServer::init"</span> );
+00096 <span class="keywordflow">if</span> ( ! <a class="code" href="a02302.html#NLNET_1_1CBufServerr12">_ReplayMode</a> )
+00097 {
+00098 <a class="code" href="a02302.html#NLNET_1_1CBufServerr4">_ListenTask</a>-&gt;init( port, <a class="code" href="a02296.html#NLNET_1_1CCallbackServera25">maxExpectedBlockSize</a>() );
+00099 <a class="code" href="a02302.html#NLNET_1_1CBufServerr5">_ListenThread</a>-&gt;<a class="code" href="a03880.html#NLMISC_1_1IThreada4">start</a>();
+00100 }
+00101 <span class="keywordflow">else</span>
+00102 {
+00103 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: Binding listen socket to any address, port %hu"</span>, port );
+00104 }
+00105 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera24" doxytag="NLNET::CBufServer::listenAddress" ></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>&amp; NLNET::CBufServer::listenAddress </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the internet address of the listening socket.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00238">238</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05513.html#l00335">_ListenTask</a>, and <a class="el" href="a05513.html#l00104">NLNET::CListenTask::localAddr()</a>.
+<p>
+Referenced by <a class="el" href="a05962.html#l00338">NLNET::CLoginServer::init()</a>, <a class="el" href="a05962.html#l00467">NLNET::NLMISC_DYNVARIABLE()</a>, and <a class="el" href="a05962.html#l00244">NLNET::setListenAddress()</a>.
+<p>
+<div class="fragment"><pre>00238 { <span class="keywordflow">return</span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr4">_ListenTask</a>-&gt;localAddr(); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera25" doxytag="NLNET::CBufServer::maxExpectedBlockSize" ></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::CBufNetBase::maxExpectedBlockSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the max size of the received messages (default: 2^31-1).
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00135">135</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00223">NLNET::CBufNetBase::_MaxExpectedBlockSize</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a05506.html#l00085">NLNET::CBufClient::connect()</a>, and <a class="el" href="a05512.html#l00093">init()</a>.
+<p>
+<div class="fragment"><pre>00136 {
+00137 <span class="keywordflow">return</span> _MaxExpectedBlockSize;
+00138 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera26" doxytag="NLNET::CBufServer::maxSentBlockSize" ></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::CBufNetBase::maxSentBlockSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the max size of the sent messages (default: 2^31-1).
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00141">141</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00226">NLNET::CBufNetBase::_MaxSentBlockSize</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00299">send()</a>, and <a class="el" href="a05506.html#l00121">NLNET::CBufClient::send()</a>.
+<p>
+<div class="fragment"><pre>00142 {
+00143 <span class="keywordflow">return</span> _MaxSentBlockSize;
+00144 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera27" doxytag="NLNET::CBufServer::nbConnections" ></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::CBufServer::nbConnections </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the number of connections (at the last <a class="el" href="a02302.html#NLNET_1_1CCallbackServera40">update()</a>).
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00267">267</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05513.html#l00367">_NbConnections</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a05528.html#l00124">NLNET::CCallbackServer::send()</a>.
+<p>
+<div class="fragment"><pre>00267 { <span class="keywordflow">return</span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr8">_NbConnections</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera28" doxytag="NLNET::CBufServer::newBytesReceived" ></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::CBufServer::newBytesReceived </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the number of bytes popped by <a class="el" href="a02302.html#NLNET_1_1CCallbackServera30">receive()</a> since the previous call to this method.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05512.html#l00749">749</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00361">_PrevBytesPoppedIn</a>, <a class="el" href="a05513.html#l00255">bytesReceived()</a>, and <a class="el" href="a05981.html#l00102">uint64</a>.
+<p>
+<div class="fragment"><pre>00750 {
+00751 <a class="code" href="a04558.html#a13">uint64</a> b = <a class="code" href="a02302.html#NLNET_1_1CCallbackServera2">bytesReceived</a>();
+00752 <a class="code" href="a04558.html#a13">uint64</a> nbrecvd = b - <a class="code" href="a02302.html#NLNET_1_1CBufServerr10">_PrevBytesPoppedIn</a>;
+00753 <span class="comment">//nlinfo( "b: %"NL_I64"u new: %"NL_I64"u", b, nbrecvd );</span>
+00754 <a class="code" href="a02302.html#NLNET_1_1CBufServerr10">_PrevBytesPoppedIn</a> = b;
+00755 <span class="keywordflow">return</span> nbrecvd;
+00756 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera29" doxytag="NLNET::CBufServer::newBytesSent" ></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::CBufServer::newBytesSent </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the number of bytes pushed by <a class="el" href="a02302.html#NLNET_1_1CBufServera20">send()</a> since the previous call to this method.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05512.html#l00761">761</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00364">_PrevBytesPushedOut</a>, <a class="el" href="a05513.html#l00261">bytesSent()</a>, and <a class="el" href="a05981.html#l00102">uint64</a>.
+<p>
+<div class="fragment"><pre>00762 {
+00763 <a class="code" href="a04558.html#a13">uint64</a> b = <a class="code" href="a02302.html#NLNET_1_1CCallbackServera3">bytesSent</a>();
+00764 <a class="code" href="a04558.html#a13">uint64</a> nbsent = b - <a class="code" href="a02302.html#NLNET_1_1CBufServerr11">_PrevBytesPushedOut</a>;
+00765 <span class="comment">//nlinfo( "b: %"NL_I64"u new: %"NL_I64"u", b, nbsent );</span>
+00766 <a class="code" href="a02302.html#NLNET_1_1CBufServerr11">_PrevBytesPushedOut</a> = b;
+00767 <span class="keywordflow">return</span> nbsent;
+00768 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb9" doxytag="NLNET::CBufServer::noDelay" ></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::CBufServer::noDelay </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, protected]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the TCP_NODELAY flag.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00276">276</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00779">NLNET::CListenTask::run()</a>.
+<p>
+<div class="fragment"><pre>00276 { <span class="keywordflow">return</span> <a class="code" href="a02302.html#NLNET_1_1CBufServerr9">_NoDelay</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb11" doxytag="NLNET::CBufServer::pushBufferToHost" ></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::CBufServer::pushBufferToHost </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02271.html">NLMISC::CMemStream</a> &amp;&nbsp;</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="a02303.html">TSockId</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>hostid</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, protected]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Pushes a buffer to the specified host's send queue and update (unless not connected).
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00298">298</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05513.html#l00355">_BytesPushedOut</a>, <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05515.html#l00178">NLNET::CBufSock::pushBuffer()</a>, <a class="el" href="a05511.html#l00059">NLNET::TBlockSize</a>, and <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00299">send()</a>.
+<p>
+<div class="fragment"><pre>00299 {
+00300 <a class="code" href="a04199.html#a6">nlassert</a>( hostid != InvalidSockId );
+00301 <span class="keywordflow">if</span> ( hostid-&gt;pushBuffer( buffer ) )
+00302 {
+00303 <a class="code" href="a02302.html#NLNET_1_1CBufServerr1">_BytesPushedOut</a> += <a class="code" href="a04223.html#a589">buffer</a>.length() + <span class="keyword">sizeof</span>(<a class="code" href="a05379.html#a80">TBlockSize</a>); <span class="comment">// statistics</span>
+00304 }
+00305 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb12" doxytag="NLNET::CBufServer::pushMessageIntoReceiveQueue" ></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::CBufNetBase::pushMessageIntoReceiveQueue </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>size</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, protected, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00183">183</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00211">NLNET::CBufNetBase::_RecvFifo</a>, <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05511.html#l00056">NLNET::CFifoAccessor</a>, <a class="el" href="a05511.html#l00203">NLNET::CBufNetBase::setDataAvailableFlag()</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00184 {
+00185 <span class="comment">//sint32 mbsize;</span>
+00186 {
+00187 <span class="comment">//nldebug( "BNB: Acquiring the receive queue... ");</span>
+00188 <a class="code" href="a05379.html#a79">CFifoAccessor</a> recvfifo( &amp;_RecvFifo );
+00189 <span class="comment">//nldebug( "BNB: Acquired, pushing the received buffer... ");</span>
+00190 recvfifo.value().push( buffer, size );
+00191 <span class="comment">//nldebug( "BNB: Pushed, releasing the receive queue..." );</span>
+00192 <span class="comment">//mbsize = recvfifo.value().size() / 1048576;</span>
+00193 <a class="code" href="a02296.html#NLNET_1_1CCallbackServerb16">setDataAvailableFlag</a>( <span class="keyword">true</span> );
+00194 }
+00195 <span class="comment">//nldebug( "BNB: Released." );</span>
+00196 <span class="comment">/*if ( mbsize &gt; 1 )</span>
+00197 <span class="comment"> {</span>
+00198 <span class="comment"> nlwarning( "The receive queue size exceeds %d MB", mbsize );</span>
+00199 <span class="comment"> }*/</span>
+00200 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb13" doxytag="NLNET::CBufServer::pushMessageIntoReceiveQueue" ></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::CBufNetBase::pushMessageIntoReceiveQueue </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::vector&lt; <a class="el" href="a04558.html#a7">uint8</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>buffer</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, protected, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Push message into receive queue (mutexed).
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00164">164</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00211">NLNET::CBufNetBase::_RecvFifo</a>, <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05511.html#l00056">NLNET::CFifoAccessor</a>, and <a class="el" href="a05511.html#l00203">NLNET::CBufNetBase::setDataAvailableFlag()</a>.
+<p>
+Referenced by <a class="el" href="a05515.html#l00135">NLNET::CBufSock::advertiseSystemEvent()</a>, and <a class="el" href="a05506.html#l00437">NLNET::CClientReceiveTask::run()</a>.
+<p>
+<div class="fragment"><pre>00165 {
+00166 <span class="comment">//sint32 mbsize;</span>
+00167 {
+00168 <span class="comment">//nldebug( "BNB: Acquiring the receive queue... ");</span>
+00169 <a class="code" href="a05379.html#a79">CFifoAccessor</a> recvfifo( &amp;_RecvFifo );
+00170 <span class="comment">//nldebug( "BNB: Acquired, pushing the received buffer... ");</span>
+00171 recvfifo.value().push( buffer );
+00172 <span class="comment">//nldebug( "BNB: Pushed, releasing the receive queue..." );</span>
+00173 <span class="comment">//mbsize = recvfifo.value().size() / 1048576;</span>
+00174 <a class="code" href="a02296.html#NLNET_1_1CCallbackServerb16">setDataAvailableFlag</a>( <span class="keyword">true</span> );
+00175 }
+00176 <span class="comment">//nldebug( "BNB: Released." );</span>
+00177 <span class="comment">//if ( mbsize &gt; 1 )</span>
+00178 <span class="comment">//{</span>
+00179 <span class="comment">// nlwarning( "The receive queue size exceeds %d MB", mbsize );</span>
+00180 <span class="comment">//}</span>
+00181 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera30" doxytag="NLNET::CBufServer::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"> void NLNET::CBufServer::receive </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02271.html">NLMISC::CMemStream</a> &amp;&nbsp;</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="a02303.html">TSockId</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>hostid</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>
+Receives next block of data in the specified (resizes the vector) You must call <a class="el" href="a02302.html#NLNET_1_1CBufServera3">dataAvailable()</a> before every call to <a class="el" href="a02302.html#NLNET_1_1CCallbackServera30">receive()</a>
+<p>
+Definition at line <a class="el" href="a05512.html#l00565">565</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00358">_BytesPoppedIn</a>, <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05511.html#l00056">NLNET::CFifoAccessor</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06462.html#l00060">NLMISC_BSWAP32</a>, <a class="el" href="a05515.html#l00040">nlnettrace</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05511.html#l00154">NLNET::CBufNetBase::receiveQueue()</a>, <a class="el" href="a05511.html#l00203">NLNET::CBufNetBase::setDataAvailableFlag()</a>, <a class="el" href="a05511.html#l00059">NLNET::TBlockSize</a>, <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00566 {
+00567 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"CBufServer::receive"</span> );
+00568 <span class="comment">//nlassert( dataAvailable() );</span>
+00569 <a class="code" href="a04199.html#a6">nlassert</a>( phostid != NULL );
+00570 {
+00571 <a class="code" href="a05379.html#a79">CFifoAccessor</a> recvfifo( &amp;<a class="code" href="a02296.html#NLNET_1_1CCallbackServerb14">receiveQueue</a>() );
+00572 <a class="code" href="a04199.html#a6">nlassert</a>( ! recvfifo.value().empty() );
+00573 recvfifo.value().front( buffer );
+00574 recvfifo.value().pop();
+00575 <a class="code" href="a02296.html#NLNET_1_1CCallbackServerb16">setDataAvailableFlag</a>( ! recvfifo.value().empty() );
+00576 }
+00577
+00578 <span class="comment">// Extract hostid (and event type)</span>
+00579 *phostid = *((<a class="code" href="a05379.html#a74">TSockId</a>*)&amp;(<a class="code" href="a04223.html#a589">buffer</a>.buffer()[<a class="code" href="a04223.html#a589">buffer</a>.size()-<span class="keyword">sizeof</span>(<a class="code" href="a05379.html#a74">TSockId</a>)-1]));
+00580 <a class="code" href="a04199.html#a6">nlassert</a>( <a class="code" href="a04223.html#a589">buffer</a>.buffer()[<a class="code" href="a04223.html#a589">buffer</a>.size()-1] == CBufNetBase::User );
+00581
+00582 <span class="comment">// debug features, we number all packet to be sure that they are all sent and received</span>
+00583 <span class="comment">// \todo remove this debug feature when ok</span>
+00584 <span class="preprocessor">#ifdef NL_BIG_ENDIAN</span>
+00585 <span class="preprocessor"></span> <a class="code" href="a04558.html#a11">uint32</a> val = <a class="code" href="a05039.html#a1">NLMISC_BSWAP32</a>(*(<a class="code" href="a04558.html#a11">uint32</a>*)<a class="code" href="a04223.html#a589">buffer</a>.buffer());
+00586 <span class="preprocessor">#else</span>
+00587 <span class="preprocessor"></span> <a class="code" href="a04558.html#a11">uint32</a> val = *(<a class="code" href="a04558.html#a11">uint32</a>*)<a class="code" href="a04223.html#a589">buffer</a>.buffer();
+00588 <span class="preprocessor">#endif</span>
+00589 <span class="preprocessor"></span>
+00590 <span class="comment">// nldebug ("receive message number %u", val);</span>
+00591 <span class="keywordflow">if</span> ((*phostid)-&gt;ReceiveNextValue != val)
+00592 {
+00593 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"LNETL1: !!!LOST A MESSAGE!!! I received the message number %u but I'm waiting the message number %u (cnx %s), warn lecroart@nevrax.com with the log now please"</span>, val, (*phostid)-&gt;ReceiveNextValue, (*phostid)-&gt;asString().c_str());
+00594 <span class="comment">// resync the message number</span>
+00595 (*phostid)-&gt;ReceiveNextValue = val;
+00596 }
+00597
+00598 (*phostid)-&gt;ReceiveNextValue++;
+00599
+00600 <a class="code" href="a04223.html#a589">buffer</a>.resize( <a class="code" href="a04223.html#a589">buffer</a>.size()-<span class="keyword">sizeof</span>(<a class="code" href="a05379.html#a74">TSockId</a>)-1 );
+00601
+00602 <span class="comment">// TODO OPTIM remove the nldebug for speed</span>
+00603 <span class="comment">//commented for optimisation nldebug( "LNETL1: Read buffer (%d+%d B) from %s", buffer.size(), sizeof(TSockId)+1, /*stringFromVector(buffer).c_str(), */(*phostid)-&gt;asString().c_str() );</span>
+00604
+00605 <span class="comment">// Statistics</span>
+00606 <a class="code" href="a02302.html#NLNET_1_1CBufServerr0">_BytesPoppedIn</a> += <a class="code" href="a04223.html#a589">buffer</a>.size() + <span class="keyword">sizeof</span>(<a class="code" href="a05379.html#a80">TBlockSize</a>);
+00607 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb14" doxytag="NLNET::CBufServer::receiveQueue" ></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="a05379.html#a78">CSynchronizedFIFO</a>&amp; NLNET::CBufNetBase::receiveQueue </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, protected, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Access to the receive queue.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00154">154</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00211">NLNET::CBufNetBase::_RecvFifo</a>, and <a class="el" href="a05511.html#l00053">NLNET::CSynchronizedFIFO</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00364">dataAvailable()</a>, <a class="el" href="a05506.html#l00140">NLNET::CBufClient::dataAvailable()</a>, <a class="el" href="a05506.html#l00318">NLNET::CBufClient::disconnect()</a>, <a class="el" href="a05512.html#l00565">receive()</a>, <a class="el" href="a05506.html#l00272">NLNET::CBufClient::receive()</a>, and <a class="el" href="a05512.html#l00987">NLNET::CServerReceiveTask::run()</a>.
+<p>
+<div class="fragment"><pre>00154 { <span class="keywordflow">return</span> _RecvFifo; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb15" doxytag="NLNET::CBufServer::receiveTask" ></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="a03366.html">CServerReceiveTask</a>* NLNET::CBufServer::receiveTask </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">std::vector&lt; <a class="el" href="a03880.html">NLMISC::IThread</a> * &gt;::iterator&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>ipt</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, protected]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns the receive task corresponding to a particular thread.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00284">284</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00251">disconnect()</a>, <a class="el" href="a05512.html#l00866">dispatchNewSocket()</a>, <a class="el" href="a05512.html#l00713">displaySendQueueStat()</a>, <a class="el" href="a05512.html#l00695">displayThreadStat()</a>, <a class="el" href="a05512.html#l00660">getSendQueueSize()</a>, <a class="el" href="a05512.html#l00299">send()</a>, <a class="el" href="a05512.html#l00613">update()</a>, and <a class="el" href="a05512.html#l00166">~CBufServer()</a>.
+<p>
+<div class="fragment"><pre>00285 {
+00286 <span class="keywordflow">return</span> ((<a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a>*)((*ipt)-&gt;getRunnable()));
+00287 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera20" doxytag="NLNET::CBufServer::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"> void NLNET::CBufServer::send </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02271.html">NLMISC::CMemStream</a> &amp;&nbsp;</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="a02303.html">TSockId</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>hostid</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>
+Send a message to the specified host, or to all hosts if hostid is InvalidSockId
+<p>
+Reimplemented in <a class="el" href="a02307.html#NLNET_1_1CCallbackServerd2">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05512.html#l00299">299</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00487">NLNET::CServerReceiveTask::_Connections</a>, <a class="el" href="a05513.html#l00346">_ThreadPool</a>, <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05511.html#l00141">NLNET::CBufNetBase::maxSentBlockSize()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00333">nlassertex</a>, <a class="el" href="a06462.html#l00060">NLMISC_BSWAP32</a>, <a class="el" href="a05515.html#l00040">nlnettrace</a>, <a class="el" href="a05513.html#l00298">pushBufferToHost()</a>, <a class="el" href="a05513.html#l00284">receiveTask()</a>, <a class="el" href="a05515.html#l00074">NLNET::CBufSock::SendNextValue</a>, <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00300 {
+00301 <a class="code" href="a04092.html#a0">nlnettrace</a>( <span class="stringliteral">"CBufServer::send"</span> );
+00302 <a class="code" href="a04199.html#a6">nlassert</a>( <a class="code" href="a04223.html#a589">buffer</a>.length() &gt; 0 );
+00303 <a class="code" href="a04199.html#a8">nlassertex</a>( <a class="code" href="a04223.html#a589">buffer</a>.length() &lt;= <a class="code" href="a02296.html#NLNET_1_1CCallbackServera26">maxSentBlockSize</a>(), (<span class="stringliteral">"length=%u max=%u"</span>, <a class="code" href="a04223.html#a589">buffer</a>.length(), <a class="code" href="a02296.html#NLNET_1_1CCallbackServera26">maxSentBlockSize</a>()) );
+00304
+00305 <span class="comment">// slow down the layer H_AUTO (CBufServer_send);</span>
+00306
+00307 <span class="keywordflow">if</span> ( hostid != InvalidSockId )
+00308 {
+00309 <span class="comment">// debug features, we number all packet to be sure that they are all sent and received</span>
+00310 <span class="comment">// \todo remove this debug feature when ok</span>
+00311 <span class="comment">// nldebug ("send message number %u", hostid-&gt;SendNextValue);</span>
+00312 <span class="preprocessor">#ifdef NL_BIG_ENDIAN</span>
+00313 <span class="preprocessor"></span> <a class="code" href="a04558.html#a11">uint32</a> val = <a class="code" href="a05039.html#a1">NLMISC_BSWAP32</a>(hostid-&gt;SendNextValue);
+00314 <span class="preprocessor">#else</span>
+00315 <span class="preprocessor"></span> <a class="code" href="a04558.html#a11">uint32</a> val = hostid-&gt;SendNextValue;
+00316 <span class="preprocessor">#endif</span>
+00317 <span class="preprocessor"></span>
+00318 *(<a class="code" href="a04558.html#a11">uint32</a>*)<a class="code" href="a04223.html#a589">buffer</a>.buffer() = val;
+00319 hostid-&gt;SendNextValue++;
+00320
+00321 <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb11">pushBufferToHost</a>( buffer, hostid );
+00322 }
+00323 <span class="keywordflow">else</span>
+00324 {
+00325 <span class="comment">// Push into all send queues</span>
+00326 CThreadPool::iterator ipt;
+00327 {
+00328 CSynchronized&lt;CThreadPool&gt;::CAccessor poolsync( &amp;_ThreadPool );
+00329 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00330 {
+00331 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt);
+00332 CConnections::iterator ipb;
+00333 {
+00334 CSynchronized&lt;CConnections&gt;::CAccessor connectionssync( &amp;task-&gt;_Connections );
+00335 <span class="keywordflow">for</span> ( ipb=connectionssync.value().begin(); ipb!=connectionssync.value().end(); ++ipb )
+00336 {
+00337 <span class="comment">// Send only if the socket is logically connected</span>
+00338 <span class="keywordflow">if</span> ( (*ipb)-&gt;connectedState() )
+00339 {
+00340 <span class="comment">// debug features, we number all packet to be sure that they are all sent and received</span>
+00341 <span class="comment">// \todo remove this debug feature when ok</span>
+00342 <span class="comment">// nldebug ("send message number %u", (*ipb)-&gt;SendNextValue);</span>
+00343 <span class="preprocessor">#ifdef NL_BIG_ENDIAN</span>
+00344 <span class="preprocessor"></span> <a class="code" href="a04558.html#a11">uint32</a> val = <a class="code" href="a05039.html#a1">NLMISC_BSWAP32</a>((*ipb)-&gt;SendNextValue);
+00345 <span class="preprocessor">#else</span>
+00346 <span class="preprocessor"></span> <a class="code" href="a04558.html#a11">uint32</a> val = (*ipb)-&gt;SendNextValue;
+00347 <span class="preprocessor">#endif</span>
+00348 <span class="preprocessor"></span> *(<a class="code" href="a04558.html#a11">uint32</a>*)<a class="code" href="a04223.html#a589">buffer</a>.buffer() = val;
+00349 (*ipb)-&gt;SendNextValue++;
+00350
+00351 <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb11">pushBufferToHost</a>( buffer, *ipb );
+00352 }
+00353 }
+00354 }
+00355 }
+00356 }
+00357 }
+00358 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera21" doxytag="NLNET::CBufServer::setConnectionCallback" ></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::CBufServer::setConnectionCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a05379.html#a76">TNetCallback</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>cb</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>void *&nbsp;</td>
+ <td class="mdname" nowrap> <em>arg</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sets callback for incoming connections (or NULL to disable callback).
+<p>
+
+<p>
+Reimplemented in <a class="el" href="a02307.html#NLNET_1_1CCallbackServera32">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05513.html#l00184">184</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05513.html#l00349">_ConnectionCallback</a>, <a class="el" href="a05513.html#l00352">_ConnectionCbArg</a>, and <a class="el" href="a05511.html#l00047">NLNET::TNetCallback</a>.
+<p>
+<div class="fragment"><pre>00184 { <a class="code" href="a02302.html#NLNET_1_1CBufServerr2">_ConnectionCallback</a> = cb; <a class="code" href="a02302.html#NLNET_1_1CBufServerr3">_ConnectionCbArg</a> = arg; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServerb16" doxytag="NLNET::CBufServer::setDataAvailableFlag" ></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::CBufNetBase::setDataAvailableFlag </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>da</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, protected, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sets _DataAvailable.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00203">203</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00214">NLNET::CBufNetBase::_DataAvailable</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00364">dataAvailable()</a>, <a class="el" href="a05506.html#l00140">NLNET::CBufClient::dataAvailable()</a>, <a class="el" href="a05506.html#l00318">NLNET::CBufClient::disconnect()</a>, <a class="el" href="a05511.html#l00164">NLNET::CBufNetBase::pushMessageIntoReceiveQueue()</a>, <a class="el" href="a05512.html#l00565">receive()</a>, <a class="el" href="a05506.html#l00272">NLNET::CBufClient::receive()</a>, and <a class="el" href="a05512.html#l00987">NLNET::CServerReceiveTask::run()</a>.
+<p>
+<div class="fragment"><pre>00203 { _DataAvailable = da; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServera22" doxytag="NLNET::CBufServer::setDisconnectionCallback" ></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::CBufNetBase::setDisconnectionCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a05379.html#a76">TNetCallback</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>cb</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>void *&nbsp;</td>
+ <td class="mdname" nowrap> <em>arg</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</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>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sets callback for detecting a disconnection (or NULL to disable callback).
+<p>
+
+<p>
+Reimplemented in <a class="el" href="a02305.html#NLNET_1_1CCallbackClienta36">NLNET::CCallbackClient</a>, and <a class="el" href="a02307.html#NLNET_1_1CCallbackServera34">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05511.html#l00085">85</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00217">NLNET::CBufNetBase::_DisconnectionCallback</a>, <a class="el" href="a05511.html#l00220">NLNET::CBufNetBase::_DisconnectionCbArg</a>, and <a class="el" href="a05511.html#l00047">NLNET::TNetCallback</a>.
+<p>
+<div class="fragment"><pre>00085 { _DisconnectionCallback = cb; _DisconnectionCbArg = arg; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera35" doxytag="NLNET::CBufServer::setMaxExpectedBlockSize" ></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::CBufNetBase::setMaxExpectedBlockSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>limit</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sets the max size of the received messages. If receiving a message bigger than the limit, the connection will be dropped.<p>
+Default value: 1 MegaByte If you put a negative number as limit, the max size is reset to the default value. Warning: you can call this method only at initialization time, before connecting (for a client) or calling init() (for a server) !
+<p>
+Definition at line <a class="el" href="a05511.html#l00109">109</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00223">NLNET::CBufNetBase::_MaxExpectedBlockSize</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00110 {
+00111 <span class="keywordflow">if</span> ( limit &lt; 0 )
+00112 _MaxExpectedBlockSize = 1048576;
+00113 <span class="keywordflow">else</span>
+00114 _MaxExpectedBlockSize = (<a class="code" href="a04558.html#a11">uint32</a>)limit;
+00115 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera36" doxytag="NLNET::CBufServer::setMaxSentBlockSize" ></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::CBufNetBase::setMaxSentBlockSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>limit</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sets the max size of the sent messages. Note: Limiting of sending not implemented, currently<p>
+Default value: 1 MegaByte If you put a negative number as limit, the max size is reset to the default value. Warning: you can call this method only at initialization time, before connecting (for a client) or calling init() (for a server) !
+<p>
+Definition at line <a class="el" href="a05511.html#l00126">126</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>.
+<p>
+References <a class="el" href="a05511.html#l00226">NLNET::CBufNetBase::_MaxSentBlockSize</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00127 {
+00128 <span class="keywordflow">if</span> ( limit &lt; 0 )
+00129 _MaxSentBlockSize = 1048576;
+00130 <span class="keywordflow">else</span>
+00131 _MaxSentBlockSize = (<a class="code" href="a04558.html#a11">uint32</a>)limit;
+00132 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera38" doxytag="NLNET::CBufServer::setSizeFlushTrigger" ></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::CBufServer::setSizeFlushTrigger </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02303.html">TSockId</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>destid</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>size</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sets the size flush trigger. When the size of the send queue reaches or exceeds this value, all data in the send queue is automatically sent (-1 to disable this trigger )
+<p>
+Definition at line <a class="el" href="a05513.html#l00226">226</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05515.html#l00104">NLNET::CBufSock::setSizeFlushTrigger()</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>.
+<p>
+<div class="fragment"><pre>00226 { <a class="code" href="a04199.html#a6">nlassert</a>( destid != InvalidSockId ); destid-&gt;setSizeFlushTrigger( size ); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera39" doxytag="NLNET::CBufServer::setTimeFlushTrigger" ></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::CBufServer::setTimeFlushTrigger </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02303.html">TSockId</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>destid</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ms</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sets the time flush trigger (in millisecond). When this time is elapsed, all data in the send queue is automatically sent (-1 to disable this trigger)
+<p>
+Definition at line <a class="el" href="a05513.html#l00221">221</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05514.html#l00236">NLNET::CBufSock::setTimeFlushTrigger()</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05511.html#l00042">NLNET::TSockId</a>.
+<p>
+<div class="fragment"><pre>00221 { <a class="code" href="a04199.html#a6">nlassert</a>( destid != InvalidSockId ); destid-&gt;setTimeFlushTrigger( ms ); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServera40" doxytag="NLNET::CBufServer::update" ></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::CBufServer::update </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Update the network (call this method evenly).
+<p>
+
+<p>
+Definition at line <a class="el" href="a05512.html#l00613">613</a> of file <a class="el" href="a05512.html">buf_server.cpp</a>.
+<p>
+References <a class="el" href="a05513.html#l00487">NLNET::CServerReceiveTask::_Connections</a>, <a class="el" href="a05513.html#l00367">_NbConnections</a>, <a class="el" href="a05513.html#l00346">_ThreadPool</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, and <a class="el" href="a05513.html#l00284">receiveTask()</a>.
+<p>
+<div class="fragment"><pre>00614 {
+00615 <span class="comment">//nlnettrace( "CBufServer::update-BEGIN" );</span>
+00616
+00617 <a class="code" href="a02302.html#NLNET_1_1CBufServerr8">_NbConnections</a> = 0;
+00618
+00619 <span class="comment">// For each thread</span>
+00620 CThreadPool::iterator ipt;
+00621 {
+00622 <span class="comment">//nldebug( "UPD: Acquiring the Thread Pool" );</span>
+00623 CSynchronized&lt;CThreadPool&gt;::CAccessor poolsync( &amp;_ThreadPool );
+00624 <span class="comment">//nldebug( "UPD: Acquired." );</span>
+00625 <span class="keywordflow">for</span> ( ipt=poolsync.value().begin(); ipt!=poolsync.value().end(); ++ipt )
+00626 {
+00627 <span class="comment">// For each thread of the pool</span>
+00628 <a class="code" href="a02302.html#NLNET_1_1CCallbackServern3">CServerReceiveTask</a> *task = <a class="code" href="a02302.html#NLNET_1_1CCallbackServerb15">receiveTask</a>(ipt);
+00629 CConnections::iterator ipb;
+00630 {
+00631 CSynchronized&lt;CConnections&gt;::CAccessor connectionssync( &amp;task-&gt;_Connections );
+00632 <span class="keywordflow">for</span> ( ipb=connectionssync.value().begin(); ipb!=connectionssync.value().end(); ++ipb )
+00633 {
+00634 <span class="comment">// For each socket of the thread, update sending</span>
+00635 <span class="keywordflow">if</span> ( ! ((*ipb)-&gt;Sock-&gt;connected() &amp;&amp; (*ipb)-&gt;update()) )
+00636 {
+00637 <span class="comment">// Update did not work or the socket is not connected anymore</span>
+00638 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"LNETL1: Socket %s is disconnected"</span>, (*ipb)-&gt;asString().c_str() );
+00639 <span class="comment">// Disconnection event if disconnected (known either from flush (in update) or when receiving data)</span>
+00640 (*ipb)-&gt;advertiseDisconnection( <span class="keyword">this</span>, *ipb );
+00641
+00642 <span class="comment">/*if ( (*ipb)-&gt;advertiseDisconnection( this, *ipb ) )</span>
+00643 <span class="comment"> {</span>
+00644 <span class="comment"> // Now the connection removal is in dataAvailable()</span>
+00645 <span class="comment"> // POLL6</span>
+00646 <span class="comment"> }*/</span>
+00647 }
+00648 <span class="keywordflow">else</span>
+00649 {
+00650 <a class="code" href="a02302.html#NLNET_1_1CBufServerr8">_NbConnections</a>++;
+00651 }
+00652 }
+00653 }
+00654 }
+00655 }
+00656
+00657 <span class="comment">//nlnettrace( "CBufServer::update-END" );</span>
+00658 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="NLNET_1_1CCallbackServern1" doxytag="NLNET::CBufServer::CListenTask" ></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"> friend class <a class="el" href="a02770.html">CListenTask</a><code> [friend]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00272">272</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00058">CBufServer()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServern2" doxytag="NLNET::CBufServer::CServerBufSock" ></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"> friend class <a class="el" href="a03365.html">CServerBufSock</a><code> [friend]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00271">271</a> of file <a class="el" href="a05513.html">buf_server.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServern3" doxytag="NLNET::CBufServer::CServerReceiveTask" ></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"> friend class <a class="el" href="a03366.html">CServerReceiveTask</a><code> [friend]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00273">273</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00958">addNewThread()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CCallbackServern4" doxytag="NLNET::CBufServer::NLNET::CBufSock" ></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"> friend class <a class="el" href="a02303.html">NLNET::CBufSock</a><code> [friend, inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05511.html#l00148">148</a> of file <a class="el" href="a05511.html">buf_net_base.h</a>. </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLNET_1_1CBufServerr0" doxytag="NLNET::CBufServer::_BytesPoppedIn" ></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="a02302.html#NLNET_1_1CBufServerr0">NLNET::CBufServer::_BytesPoppedIn</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Number of bytes popped by <a class="el" href="a02302.html#NLNET_1_1CCallbackServera30">receive()</a> since the beginning.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00358">358</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05513.html#l00255">bytesReceived()</a>, and <a class="el" href="a05512.html#l00565">receive()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr1" doxytag="NLNET::CBufServer::_BytesPushedOut" ></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="a02302.html#NLNET_1_1CBufServerr1">NLNET::CBufServer::_BytesPushedOut</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Number of bytes pushed by <a class="el" href="a02302.html#NLNET_1_1CBufServera20">send()</a> since the beginning.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00355">355</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05513.html#l00261">bytesSent()</a>, and <a class="el" href="a05513.html#l00298">pushBufferToHost()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr2" doxytag="NLNET::CBufServer::_ConnectionCallback" ></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="a05379.html#a76">TNetCallback</a> <a class="el" href="a02302.html#NLNET_1_1CBufServerr2">NLNET::CBufServer::_ConnectionCallback</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Connection callback.
+<p>
+
+<p>
+Reimplemented in <a class="el" href="a02307.html#NLNET_1_1CCallbackServerr0">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05513.html#l00349">349</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05513.html#l00311">connectionCallback()</a>, and <a class="el" href="a05513.html#l00184">setConnectionCallback()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr3" doxytag="NLNET::CBufServer::_ConnectionCbArg" ></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* <a class="el" href="a02302.html#NLNET_1_1CBufServerr3">NLNET::CBufServer::_ConnectionCbArg</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Argument of the connection callback.
+<p>
+
+<p>
+Reimplemented in <a class="el" href="a02307.html#NLNET_1_1CCallbackServerr1">NLNET::CCallbackServer</a>.
+<p>
+Definition at line <a class="el" href="a05513.html#l00352">352</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05513.html#l00314">argOfConnectionCallback()</a>, and <a class="el" href="a05513.html#l00184">setConnectionCallback()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr4" doxytag="NLNET::CBufServer::_ListenTask" ></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="a02770.html">CListenTask</a>* <a class="el" href="a02302.html#NLNET_1_1CBufServerr4">NLNET::CBufServer::_ListenTask</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Listen task.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00335">335</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00058">CBufServer()</a>, <a class="el" href="a05512.html#l00695">displayThreadStat()</a>, <a class="el" href="a05512.html#l00093">init()</a>, <a class="el" href="a05513.html#l00238">listenAddress()</a>, and <a class="el" href="a05512.html#l00166">~CBufServer()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr5" doxytag="NLNET::CBufServer::_ListenThread" ></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="a03880.html">NLMISC::IThread</a>* <a class="el" href="a02302.html#NLNET_1_1CBufServerr5">NLNET::CBufServer::_ListenThread</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Listen thread.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00338">338</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00058">CBufServer()</a>, <a class="el" href="a05512.html#l00093">init()</a>, and <a class="el" href="a05512.html#l00166">~CBufServer()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr6" doxytag="NLNET::CBufServer::_MaxSocketsPerThread" ></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#a9">uint16</a> <a class="el" href="a02302.html#NLNET_1_1CBufServerr6">NLNET::CBufServer::_MaxSocketsPerThread</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Max number of sockets handled by one thread.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00332">332</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00866">dispatchNewSocket()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr7" doxytag="NLNET::CBufServer::_MaxThreads" ></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#a9">uint16</a> <a class="el" href="a02302.html#NLNET_1_1CBufServerr7">NLNET::CBufServer::_MaxThreads</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Max number of threads.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00329">329</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00866">dispatchNewSocket()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr8" doxytag="NLNET::CBufServer::_NbConnections" ></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> <a class="el" href="a02302.html#NLNET_1_1CBufServerr8">NLNET::CBufServer::_NbConnections</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Number of connections (debug stat).
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00367">367</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05513.html#l00267">nbConnections()</a>, and <a class="el" href="a05512.html#l00613">update()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr9" doxytag="NLNET::CBufServer::_NoDelay" ></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="a02302.html#NLNET_1_1CBufServerr9">NLNET::CBufServer::_NoDelay</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+TCP_NODELAY.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00323">323</a> of file <a class="el" href="a05513.html">buf_server.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr10" doxytag="NLNET::CBufServer::_PrevBytesPoppedIn" ></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="a02302.html#NLNET_1_1CBufServerr10">NLNET::CBufServer::_PrevBytesPoppedIn</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Previous number of bytes received.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00361">361</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00749">newBytesReceived()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr11" doxytag="NLNET::CBufServer::_PrevBytesPushedOut" ></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="a02302.html#NLNET_1_1CBufServerr11">NLNET::CBufServer::_PrevBytesPushedOut</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Previous number of bytes sent.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00364">364</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00761">newBytesSent()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr12" doxytag="NLNET::CBufServer::_ReplayMode" ></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="a02302.html#NLNET_1_1CBufServerr12">NLNET::CBufServer::_ReplayMode</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Replay mode flag.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00370">370</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00058">CBufServer()</a>, <a class="el" href="a05512.html#l00093">init()</a>, and <a class="el" href="a05512.html#l00166">~CBufServer()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr13" doxytag="NLNET::CBufServer::_ThreadPool" ></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"> NLMISC::CSynchronized&lt;<a class="el" href="a05379.html#a81">CThreadPool</a>&gt; <a class="el" href="a02302.html#NLNET_1_1CBufServerr13">NLNET::CBufServer::_ThreadPool</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00346">346</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00251">disconnect()</a>, <a class="el" href="a05512.html#l00866">dispatchNewSocket()</a>, <a class="el" href="a05512.html#l00713">displaySendQueueStat()</a>, <a class="el" href="a05512.html#l00695">displayThreadStat()</a>, <a class="el" href="a05512.html#l00660">getSendQueueSize()</a>, <a class="el" href="a05512.html#l00299">send()</a>, <a class="el" href="a05512.html#l00613">update()</a>, and <a class="el" href="a05512.html#l00166">~CBufServer()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CBufServerr14" doxytag="NLNET::CBufServer::_ThreadStrategy" ></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="a02302.html#NLNET_1_1CCallbackServerw9">TThreadStategy</a> <a class="el" href="a02302.html#NLNET_1_1CBufServerr14">NLNET::CBufServer::_ThreadStrategy</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Thread socket-handling strategy.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05513.html#l00326">326</a> of file <a class="el" href="a05513.html">buf_server.h</a>.
+<p>
+Referenced by <a class="el" href="a05512.html#l00866">dispatchNewSocket()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a05513.html">buf_server.h</a><li><a class="el" href="a05512.html">buf_server.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:53:23 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>