diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/classNLNET_1_1CBufServer.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/classNLNET_1_1CBufServer.html | 1786 |
1 files changed, 1786 insertions, 0 deletions
diff --git a/docs/doxygen/nel/classNLNET_1_1CBufServer.html b/docs/doxygen/nel/classNLNET_1_1CBufServer.html new file mode 100644 index 00000000..1973bea4 --- /dev/null +++ b/docs/doxygen/nel/classNLNET_1_1CBufServer.html @@ -0,0 +1,1786 @@ +<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<HTML> +<HEAD> + <TITLE>nevrax.org : docs</TITLE> + <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css"> + <link href="doxygen.css" rel="stylesheet" type="text/css"> +</HEAD> +<BODY MARGINHEIGHT="0" MARGINWIDTH="0"> + +<!-- uplinks --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A> </TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </TD> + </TR> +</TABLE> + +<!-- banner Nevrax --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%> + <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR> +</TABLE> + +<!-- main table --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + + <!------ Begin Box ------> + <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black> + <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF> + <TABLE cellspacing=0 cellpadding=1 border=0> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr> + </TABLE> + </TD></TR></TABLE></TD></TR></TABLE> + <!------ End Box ------> + + </TD> + <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + +<!-- title --> +<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td> +<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A> +</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT=""> +</td></tr></table> + + +<!-- block --> +<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD> + <TD><B>Documentation</B></TD> + <TD ALIGN=RIGHT> </td> +</tr></table> +<!-- Generated by Doxygen 1.2.14 --> +<center> +<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> </center> +<hr><h1>NLNET::CBufServer Class Reference</h1>Server class for layer 1. +<a href="#_details">More...</a> +<p> +<code>#include <<a class="el" href="buf__server_8h-source.html">buf_server.h</a>></code> +<p> +<p>Inheritance diagram for NLNET::CBufServer: +<p><center><img src="classNLNET_1_1CBufServer.gif" usemap="#NLNET::CBufServer_map" border="0"></center> +<map name="NLNET::CBufServer_map"> +<area href="classNLNET_1_1CBufNetBase.html" alt="NLNET::CBufNetBase" shape="rect" coords="0,0,155,24"> +<area href="classNLNET_1_1CCallbackServer.html" alt="NLNET::CCallbackServer" shape="rect" coords="0,112,155,136"> +</map> +<a href="classNLNET_1_1CBufServer-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> +<tr><td colspan=2><br><h2>Public Types</h2></td></tr> +<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#s2">TThreadStategy</a> { <a class="el" href="classNLNET_1_1CBufServer.html#s2s0">SpreadSockets</a>, +<a class="el" href="classNLNET_1_1CBufServer.html#s2s1">FillThreads</a> + }</td></tr> +<tr><td colspan=2><br><h2>Public Methods</h2></td></tr> +<tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a0">CBufServer</a> (<a class="el" href="classNLNET_1_1CBufServer.html#s2">TThreadStategy</a> strategy=DEFAULT_STRATEGY, <a class="el" href="memory__common_8h.html#a9">uint16</a> max_threads=DEFAULT_MAX_THREADS, <a class="el" href="memory__common_8h.html#a9">uint16</a> max_sockets_per_thread=DEFAULT_MAX_SOCKETS_PER_THREADS, bool nodelay=true, bool replaymode=false)</td></tr> +<tr><td> </td><td><font size=-1><em>Constructor Set nodelay to true to disable the Nagle buffering algorithm (see <a class="el" href="classNLNET_1_1CTcpSock.html">CTcpSock</a> documentation).</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a1">~CBufServer</a> ()</td></tr> +<tr><td> </td><td><font size=-1><em>Destructor.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a2">init</a> (<a class="el" href="memory__common_8h.html#a9">uint16</a> port)</td></tr> +<tr><td> </td><td><font size=-1><em>Listens on the specified port.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a3">disconnect</a> (<a class="el" href="namespaceNLNET.html#a0">TSockId</a> hostid, bool quick=false)</td></tr> +<tr><td> </td><td><font size=-1><em>Disconnect a connection Set hostid to InvalidSockId to disconnect all connections.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a4">setConnectionCallback</a> (<a class="el" href="namespaceNLNET.html#a2">TNetCallback</a> cb, void *arg)</td></tr> +<tr><td> </td><td><font size=-1><em>Sets callback for incoming connections (or NULL to disable callback).</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a5">send</a> (const <a class="el" href="classNLMISC_1_1CMemStream.html">NLMISC::CMemStream</a> &<a class="el" href="driver__opengl__extension__def_8h.html#a381">buffer</a>, <a class="el" href="namespaceNLNET.html#a0">TSockId</a> hostid)</td></tr> +<tr><td> </td><td><font size=-1><em>Send a message to the specified host, or to all hosts if hostid is InvalidSockId.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a6">dataAvailable</a> ()</td></tr> +<tr><td> </td><td><font size=-1><em>Checks if there is some data to receive.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a> (<a class="el" href="classNLMISC_1_1CMemStream.html">NLMISC::CMemStream</a> &<a class="el" href="driver__opengl__extension__def_8h.html#a381">buffer</a>, <a class="el" href="namespaceNLNET.html#a0">TSockId</a> *hostid)</td></tr> +<tr><td> </td><td><font size=-1><em>Receives next block of data in the specified (resizes the vector) You must call <a class="el" href="classNLNET_1_1CBufServer.html#a6">dataAvailable</a>() before every call to <a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a>().</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a8">update</a> ()</td></tr> +<tr><td> </td><td><font size=-1><em>Update the network (call this method evenly).</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a11">uint32</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a9">getSendQueueSize</a> (<a class="el" href="namespaceNLNET.html#a0">TSockId</a> destid)</td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a10">setTimeFlushTrigger</a> (<a class="el" href="namespaceNLNET.html#a0">TSockId</a> destid, <a class="el" href="memory__common_8h.html#a10">sint32</a> ms)</td></tr> +<tr><td> </td><td><font size=-1><em>Sets the time flush trigger (in millisecond).</em> <a href="#a10">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a11">setSizeFlushTrigger</a> (<a class="el" href="namespaceNLNET.html#a0">TSockId</a> destid, <a class="el" href="memory__common_8h.html#a10">sint32</a> <a class="el" href="cf__lexical_8cpp.html#a94">size</a>)</td></tr> +<tr><td> </td><td><font size=-1><em>Sets the size flush trigger.</em> <a href="#a11">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a12">flush</a> (<a class="el" href="namespaceNLNET.html#a0">TSockId</a> destid)</td></tr> +<tr><td> </td><td><font size=-1><em>Force to send all data pending in the send queue.</em> <a href="#a12">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>const <a class="el" href="classNLNET_1_1CInetAddress.html">CInetAddress</a> & </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a13">listenAddress</a> () const</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the internet address of the listening socket.</em> <a href="#a13">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>const <a class="el" href="classNLNET_1_1CInetAddress.html">CInetAddress</a> & </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a14">hostAddress</a> (<a class="el" href="namespaceNLNET.html#a0">TSockId</a> hostid)</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the address of the specified host.</em> <a href="#a14">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a13">uint64</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a15">bytesReceived</a> () const</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the number of bytes popped by <a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a>() since the beginning.</em> <a href="#a15">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a13">uint64</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a16">newBytesReceived</a> ()</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the number of bytes popped by <a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a>() since the previous call to this method.</em> <a href="#a16">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a13">uint64</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a17">bytesSent</a> () const</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the number of bytes pushed by <a class="el" href="classNLNET_1_1CBufServer.html#a5">send</a>() since the beginning.</em> <a href="#a17">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a13">uint64</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a18">newBytesSent</a> ()</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the number of bytes pushed by <a class="el" href="classNLNET_1_1CBufServer.html#a5">send</a>() since the previous call to this method.</em> <a href="#a18">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a11">uint32</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#a19">nbConnections</a> () const</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the number of connections (at the last <a class="el" href="classNLNET_1_1CBufServer.html#a8">update</a>()).</em> <a href="#a19">More...</a><em></em></font><br><br></td></tr> +<tr><td colspan=2><br><h2>Protected Methods</h2></td></tr> +<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#b0">noDelay</a> () const</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the TCP_NODELAY flag.</em> <a href="#b0">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#b1">dispatchNewSocket</a> (<a class="el" href="classNLNET_1_1CServerBufSock.html">CServerBufSock</a> *bufsock)</td></tr> +<tr><td> </td><td><font size=-1><em>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.</em> <a href="#b1">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="classNLNET_1_1CServerReceiveTask.html">CServerReceiveTask</a> * </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#b2">receiveTask</a> (std::vector< <a class="el" href="classNLMISC_1_1IThread.html">NLMISC::IThread</a> * >::iterator ipt)</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the receive task corresponding to a particular thread.</em> <a href="#b2">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#b3">pushBufferToHost</a> (const <a class="el" href="classNLMISC_1_1CMemStream.html">NLMISC::CMemStream</a> &<a class="el" href="driver__opengl__extension__def_8h.html#a381">buffer</a>, <a class="el" href="namespaceNLNET.html#a0">TSockId</a> hostid)</td></tr> +<tr><td> </td><td><font size=-1><em>Pushes a buffer to the specified host's send queue and update (unless not connected).</em> <a href="#b3">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#b4">addNewThread</a> (<a class="el" href="namespaceNLNET.html#a7">CThreadPool</a> &threadpool, <a class="el" href="classNLNET_1_1CServerBufSock.html">CServerBufSock</a> *bufsock)</td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="namespaceNLNET.html#a2">TNetCallback</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#b5">connectionCallback</a> () const</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the connection callback.</em> <a href="#b5">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#b6">argOfConnectionCallback</a> () const</td></tr> +<tr><td> </td><td><font size=-1><em>Returns the argument of the connection callback.</em> <a href="#b6">More...</a><em></em></font><br><br></td></tr> +<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr> +<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o0">_NoDelay</a></td></tr> +<tr><td> </td><td><font size=-1><em>TCP_NODELAY.</em> <a href="#o0">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="classNLNET_1_1CBufServer.html#s2">TThreadStategy</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o1">_ThreadStrategy</a></td></tr> +<tr><td> </td><td><font size=-1><em>Thread socket-handling strategy.</em> <a href="#o1">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a9">uint16</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o2">_MaxThreads</a></td></tr> +<tr><td> </td><td><font size=-1><em>Max number of threads.</em> <a href="#o2">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a9">uint16</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o3">_MaxSocketsPerThread</a></td></tr> +<tr><td> </td><td><font size=-1><em>Max number of sockets handled by one thread.</em> <a href="#o3">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="classNLNET_1_1CListenTask.html">CListenTask</a> * </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o4">_ListenTask</a></td></tr> +<tr><td> </td><td><font size=-1><em>Listen task.</em> <a href="#o4">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="classNLMISC_1_1IThread.html">NLMISC::IThread</a> * </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o5">_ListenThread</a></td></tr> +<tr><td> </td><td><font size=-1><em>Listen thread.</em> <a href="#o5">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>NLMISC::CSynchronized< <a class="el" href="namespaceNLNET.html#a7">CThreadPool</a> > </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o6">_ThreadPool</a></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="namespaceNLNET.html#a2">TNetCallback</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o7">_ConnectionCallback</a></td></tr> +<tr><td> </td><td><font size=-1><em>Connection callback.</em> <a href="#o7">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o8">_ConnectionCbArg</a></td></tr> +<tr><td> </td><td><font size=-1><em>Argument of the connection callback.</em> <a href="#o8">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a13">uint64</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o9">_BytesPushedOut</a></td></tr> +<tr><td> </td><td><font size=-1><em>Number of bytes pushed by <a class="el" href="classNLNET_1_1CBufServer.html#a5">send</a>() since the beginning.</em> <a href="#o9">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a13">uint64</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o10">_BytesPoppedIn</a></td></tr> +<tr><td> </td><td><font size=-1><em>Number of bytes popped by <a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a>() since the beginning.</em> <a href="#o10">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a13">uint64</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o11">_PrevBytesPoppedIn</a></td></tr> +<tr><td> </td><td><font size=-1><em>Previous number of bytes received.</em> <a href="#o11">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a13">uint64</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o12">_PrevBytesPushedOut</a></td></tr> +<tr><td> </td><td><font size=-1><em>Previous number of bytes sent.</em> <a href="#o12">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top><a class="el" href="memory__common_8h.html#a11">uint32</a> </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o13">_NbConnections</a></td></tr> +<tr><td> </td><td><font size=-1><em>Number of connections (debug stat).</em> <a href="#o13">More...</a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#o14">_ReplayMode</a></td></tr> +<tr><td> </td><td><font size=-1><em>Replay mode flag.</em> <a href="#o14">More...</a><em></em></font><br><br></td></tr> +<tr><td colspan=2><br><h2>Friends</h2></td></tr> +<tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#l0">CServerBufSock</a></td></tr> +<tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#l1">CListenTask</a></td></tr> +<tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classNLNET_1_1CBufServer.html#l2">CServerReceiveTask</a></td></tr> +</table> +<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: \begincode <a class="el" href="classNLNET_1_1CBufServer.html#a5">send</a>(), -> send buffer -> <a class="el" href="classNLNET_1_1CBufServer.html#a8">update</a>(), <a class="el" href="classNLNET_1_1CBufServer.html#a12">flush</a>() <a class="el" href="classNLNET_1_1CBufServer.html#a17">bytesSent</a>(), <a class="el" href="classNLNET_1_1CBufServer.html#a18">newBytesSent</a>() +<p> +<a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a>(), <a class="el" href="classNLNET_1_1CBufServer.html#a6">dataAvailable</a>(), <- receive buffer <- receive thread, <a class="el" href="classNLNET_1_1CBufServer.html#a6">dataAvailable</a>(), <a class="el" href="classNLNET_1_1CBufServer.html#a15">bytesReceived</a>(), <a class="el" href="classNLNET_1_1CBufServer.html#a16">newBytesReceived</a>(), connection callback, disconnection callback +<p> +<dl compact><dt><b> +Author: </b><dd> +Olivier Cado , Nevrax France </dl><dl compact><dt><b> +Date: </b><dd> +2001 </dl> +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00153">153</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>.<hr><h2>Member Enumeration Documentation</h2> +<a name="s2" doxytag="NLNET::CBufServer::TThreadStategy"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> enum NLNET::CBufServer::TThreadStategy + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b> +Enumeration values:</b><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a name="s2s0" doxytag="SpreadSockets"></a><em>SpreadSockets</em></em> </td><td> +</td></tr> +<tr><td valign=top><em><a name="s2s1" doxytag="FillThreads"></a><em>FillThreads</em></em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00157">157</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. </td> + </tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a name="a0" doxytag="NLNET::CBufServer::CBufServer"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLNET::CBufServer::CBufServer </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="classNLNET_1_1CBufServer.html#s2">TThreadStategy</a> </td> + <td class="mdname" nowrap> <em>strategy</em> = DEFAULT_STRATEGY, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap><a class="el" href="memory__common_8h.html#a9">uint16</a> </td> + <td class="mdname" nowrap> <em>max_threads</em> = DEFAULT_MAX_THREADS, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap><a class="el" href="memory__common_8h.html#a9">uint16</a> </td> + <td class="mdname" nowrap> <em>max_sockets_per_thread</em> = DEFAULT_MAX_SOCKETS_PER_THREADS, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>nodelay</em> = true, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>replaymode</em> = false</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Constructor Set nodelay to true to disable the Nagle buffering algorithm (see <a class="el" href="classNLNET_1_1CTcpSock.html">CTcpSock</a> documentation). +<p> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00057">57</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00327">_ListenTask</a>, <a class="el" href="buf__server_8h-source.html#l00330">_ListenThread</a>, <a class="el" href="buf__server_8h-source.html#l00362">_ReplayMode</a>, <a class="el" href="buf__server_8h-source.html#l00264">CListenTask</a>, and <a class="el" href="buf__sock_8h-source.html#l00040">nlnettrace</a>. </td> + </tr> +</table> +<a name="a1" doxytag="NLNET::CBufServer::~CBufServer"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLNET::CBufServer::~CBufServer </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Destructor. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00164">164</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00327">_ListenTask</a>, <a class="el" href="buf__server_8h-source.html#l00330">_ListenThread</a>, <a class="el" href="buf__server_8h-source.html#l00362">_ReplayMode</a>, <a class="el" href="buf__server_8h-source.html#l00338">_ThreadPool</a>, <a class="el" href="buf__server_8h-source.html#l00264">CListenTask</a>, <a class="el" href="buf__server_8h-source.html#l00265">CServerReceiveTask</a>, <a class="el" href="classNLMISC_1_1IThread.html#a4">NLMISC::IThread::getRunnable</a>, <a class="el" href="debug_8h-source.html#l00087">nldebug</a>, <a class="el" href="buf__sock_8h-source.html#l00040">nlnettrace</a>, <a class="el" href="buf__server_8h-source.html#l00276">receiveTask</a>, and <a class="el" href="classNLMISC_1_1IThread.html#a3">NLMISC::IThread::wait</a>. </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a name="b4" doxytag="NLNET::CBufServer::addNewThread"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::addNewThread </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="namespaceNLNET.html#a7">CThreadPool</a> & </td> + <td class="mdname" nowrap> <em>threadpool</em>, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap><a class="el" href="classNLNET_1_1CServerBufSock.html">CServerBufSock</a> * </td> + <td class="mdname" nowrap> <em>bufsock</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00910">910</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00265">CServerReceiveTask</a>, <a class="el" href="buf__server_8h-source.html#l00112">NLNET::CThreadPool</a>, <a class="el" href="debug_8h-source.html#l00254">nlassert</a>, <a class="el" href="debug_8h-source.html#l00087">nldebug</a>, and <a class="el" href="buf__sock_8h-source.html#l00040">nlnettrace</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00818">dispatchNewSocket</a>. </td> + </tr> +</table> +<a name="b6" doxytag="NLNET::CBufServer::argOfConnectionCallback"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void* NLNET::CBufServer::argOfConnectionCallback </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap> const<code> [inline, protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the argument of the connection callback. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00306">306</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00344">_ConnectionCbArg</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00374">dataAvailable</a>. </td> + </tr> +</table> +<a name="a15" doxytag="NLNET::CBufServer::bytesReceived"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a13">uint64</a> NLNET::CBufServer::bytesReceived </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the number of bytes popped by <a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a>() since the beginning. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00247">247</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00350">_BytesPoppedIn</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00709">newBytesReceived</a>. </td> + </tr> +</table> +<a name="a17" doxytag="NLNET::CBufServer::bytesSent"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a13">uint64</a> NLNET::CBufServer::bytesSent </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the number of bytes pushed by <a class="el" href="classNLNET_1_1CBufServer.html#a5">send</a>() since the beginning. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00253">253</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00347">_BytesPushedOut</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00721">newBytesSent</a>. </td> + </tr> +</table> +<a name="b5" doxytag="NLNET::CBufServer::connectionCallback"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="namespaceNLNET.html#a2">TNetCallback</a> NLNET::CBufServer::connectionCallback </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap> const<code> [inline, protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the connection callback. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00303">303</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00341">_ConnectionCallback</a>, and <a class="el" href="buf__net__base_8h-source.html#l00047">NLNET::TNetCallback</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00374">dataAvailable</a>. </td> + </tr> +</table> +<a name="a6" doxytag="NLNET::CBufServer::dataAvailable"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLNET::CBufServer::dataAvailable </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Checks if there is some data to receive. +<p> +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="classNLNET_1_1CCallbackServer.html#c1">NLNET::CCallbackServer</a>. +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00374">374</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00306">argOfConnectionCallback</a>, <a class="el" href="buf__net__base_8h-source.html#l00149">NLNET::CBufNetBase::argOfDisconnectionCallback</a>, <a class="el" href="buf__net__base_8h-source.html#l00056">NLNET::CFifoAccessor</a>, <a class="el" href="buf__server_8h-source.html#l00303">connectionCallback</a>, <a class="el" href="buf__server_8h-source.html#l00263">CServerBufSock</a>, <a class="el" href="buf__net__base_8h-source.html#l00195">NLNET::CBufNetBase::dataAvailableFlag</a>, <a class="el" href="buf__net__base_8h-source.html#l00146">NLNET::CBufNetBase::disconnectionCallback</a>, <a class="el" href="debug_8h-source.html#l00254">nlassert</a>, <a class="el" href="debug_8h-source.html#l00087">nldebug</a>, <a class="el" href="debug_8h-source.html#l00133">nlerror</a>, <a class="el" href="debug_8h-source.html#l00094">nlinfo</a>, <a class="el" href="buf__net__base_8h-source.html#l00143">NLNET::CBufNetBase::receiveQueue</a>, <a class="el" href="buf__net__base_8h-source.html#l00192">NLNET::CBufNetBase::setDataAvailableFlag</a>, and <a class="el" href="buf__net__base_8h-source.html#l00042">NLNET::TSockId</a>. </td> + </tr> +</table> +<a name="a3" doxytag="NLNET::CBufServer::disconnect"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::disconnect </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="namespaceNLNET.html#a0">TSockId</a> </td> + <td class="mdname" nowrap> <em>hostid</em>, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>quick</em> = false</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Disconnect a connection Set hostid to InvalidSockId to disconnect all connections. +<p> +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="buf__server_8cpp-source.html#l00261">261</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00338">_ThreadPool</a>, <a class="el" href="buf__server_8h-source.html#l00265">CServerReceiveTask</a>, <a class="el" href="buf__sock_8h-source.html#l00040">nlnettrace</a>, <a class="el" href="buf__server_8h-source.html#l00276">receiveTask</a>, and <a class="el" href="buf__net__base_8h-source.html#l00042">NLNET::TSockId</a>. </td> + </tr> +</table> +<a name="b1" doxytag="NLNET::CBufServer::dispatchNewSocket"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::dispatchNewSocket </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="classNLNET_1_1CServerBufSock.html">CServerBufSock</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>bufsock</em> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap><code> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </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> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00818">818</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00324">_MaxSocketsPerThread</a>, <a class="el" href="buf__server_8h-source.html#l00321">_MaxThreads</a>, <a class="el" href="buf__server_8h-source.html#l00338">_ThreadPool</a>, <a class="el" href="buf__server_8h-source.html#l00318">_ThreadStrategy</a>, <a class="el" href="buf__server_8cpp-source.html#l00910">addNewThread</a>, <a class="el" href="buf__server_8h-source.html#l00265">CServerReceiveTask</a>, <a class="el" href="bit__set_8cpp-source.html#l00038">min</a>, <a class="el" href="debug_8h-source.html#l00087">nldebug</a>, <a class="el" href="buf__sock_8h-source.html#l00040">nlnettrace</a>, <a class="el" href="debug_8h-source.html#l00114">nlwarning</a>, <a class="el" href="buf__server_8h-source.html#l00276">receiveTask</a>, and <a class="el" href="classNLNET_1_1CBufServer.html#s2s0">SpreadSockets</a>. </td> + </tr> +</table> +<a name="a12" doxytag="NLNET::CBufServer::flush"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLNET::CBufServer::flush </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="namespaceNLNET.html#a0">TSockId</a> </td> + <td class="mdname1" valign="top" nowrap> <em>destid</em> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Force to send all data pending in the send queue. +<p> +<dl compact><dt><b> +Returns: </b><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="classNLNET_1_1CSock.html#d2">CSock::getLastError</a>() and/or <a class="el" href="classNLNET_1_1CSock.html#d3">CSock::errorString</a>() </dl> +<p> +Reimplemented in <a class="el" href="classNLNET_1_1CCallbackServer.html#a2">NLNET::CCallbackServer</a>. +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00224">224</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="debug_8h-source.html#l00254">nlassert</a>, and <a class="el" href="buf__net__base_8h-source.html#l00042">NLNET::TSockId</a>. </td> + </tr> +</table> +<a name="a9" doxytag="NLNET::CBufServer::getSendQueueSize"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a11">uint32</a> NLNET::CBufServer::getSendQueueSize </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="namespaceNLNET.html#a0">TSockId</a> </td> + <td class="mdname1" valign="top" nowrap> <em>destid</em> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00670">670</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00338">_ThreadPool</a>, <a class="el" href="buf__server_8h-source.html#l00265">CServerReceiveTask</a>, <a class="el" href="buf__server_8h-source.html#l00276">receiveTask</a>, and <a class="el" href="buf__net__base_8h-source.html#l00042">NLNET::TSockId</a>. </td> + </tr> +</table> +<a name="a14" doxytag="NLNET::CBufServer::hostAddress"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="classNLNET_1_1CInetAddress.html">CInetAddress</a>& NLNET::CBufServer::hostAddress </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="namespaceNLNET.html#a0">TSockId</a> </td> + <td class="mdname1" valign="top" nowrap> <em>hostid</em> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the address of the specified host. +<p> + +<p> +Reimplemented in <a class="el" href="classNLNET_1_1CCallbackServer.html#a8">NLNET::CCallbackServer</a>. +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00233">233</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="debug_8h-source.html#l00254">nlassert</a>, and <a class="el" href="buf__net__base_8h-source.html#l00042">NLNET::TSockId</a>. </td> + </tr> +</table> +<a name="a2" doxytag="NLNET::CBufServer::init"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::init </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="memory__common_8h.html#a9">uint16</a> </td> + <td class="mdname1" valign="top" nowrap> <em>port</em> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Listens on the specified port. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00092">92</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00327">_ListenTask</a>, <a class="el" href="buf__server_8h-source.html#l00330">_ListenThread</a>, <a class="el" href="buf__server_8h-source.html#l00362">_ReplayMode</a>, <a class="el" href="debug_8h-source.html#l00087">nldebug</a>, <a class="el" href="buf__sock_8h-source.html#l00040">nlnettrace</a>, and <a class="el" href="classNLMISC_1_1IThread.html#a1">NLMISC::IThread::start</a>. </td> + </tr> +</table> +<a name="a13" doxytag="NLNET::CBufServer::listenAddress"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="classNLNET_1_1CInetAddress.html">CInetAddress</a>& NLNET::CBufServer::listenAddress </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the internet address of the listening socket. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00230">230</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00327">_ListenTask</a>. </td> + </tr> +</table> +<a name="a19" doxytag="NLNET::CBufServer::nbConnections"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a11">uint32</a> NLNET::CBufServer::nbConnections </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the number of connections (at the last <a class="el" href="classNLNET_1_1CBufServer.html#a8">update</a>()). +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00259">259</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00359">_NbConnections</a>. +<p> +Referenced by <a class="el" href="callback__server_8cpp-source.html#l00124">NLNET::CCallbackServer::send</a>. </td> + </tr> +</table> +<a name="a16" doxytag="NLNET::CBufServer::newBytesReceived"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a13">uint64</a> NLNET::CBufServer::newBytesReceived </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the number of bytes popped by <a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a>() since the previous call to this method. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00709">709</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00353">_PrevBytesPoppedIn</a>, and <a class="el" href="buf__server_8h-source.html#l00247">bytesReceived</a>. </td> + </tr> +</table> +<a name="a18" doxytag="NLNET::CBufServer::newBytesSent"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a13">uint64</a> NLNET::CBufServer::newBytesSent </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the number of bytes pushed by <a class="el" href="classNLNET_1_1CBufServer.html#a5">send</a>() since the previous call to this method. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00721">721</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00356">_PrevBytesPushedOut</a>, and <a class="el" href="buf__server_8h-source.html#l00253">bytesSent</a>. </td> + </tr> +</table> +<a name="b0" doxytag="NLNET::CBufServer::noDelay"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLNET::CBufServer::noDelay </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap> const<code> [inline, protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the TCP_NODELAY flag. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00268">268</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00315">_NoDelay</a>. </td> + </tr> +</table> +<a name="b3" doxytag="NLNET::CBufServer::pushBufferToHost"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::pushBufferToHost </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="classNLMISC_1_1CMemStream.html">NLMISC::CMemStream</a> & </td> + <td class="mdname" nowrap> <em>buffer</em>, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap><a class="el" href="namespaceNLNET.html#a0">TSockId</a> </td> + <td class="mdname" nowrap> <em>hostid</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </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> + + </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="buf__server_8h-source.html#l00290">290</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00347">_BytesPushedOut</a>, <a class="el" href="mem__stream_8h-source.html#l00152">NLMISC::CMemStream::length</a>, <a class="el" href="debug_8h-source.html#l00254">nlassert</a>, and <a class="el" href="buf__net__base_8h-source.html#l00042">NLNET::TSockId</a>. </td> + </tr> +</table> +<a name="a7" doxytag="NLNET::CBufServer::receive"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::receive </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="classNLMISC_1_1CMemStream.html">NLMISC::CMemStream</a> & </td> + <td class="mdname" nowrap> <em>buffer</em>, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap><a class="el" href="namespaceNLNET.html#a0">TSockId</a> * </td> + <td class="mdname" nowrap> <em>hostid</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Receives next block of data in the specified (resizes the vector) You must call <a class="el" href="classNLNET_1_1CBufServer.html#a6">dataAvailable</a>() before every call to <a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a>(). +<p> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00575">575</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00350">_BytesPoppedIn</a>, <a class="el" href="buf__net__base_8h-source.html#l00056">NLNET::CFifoAccessor</a>, <a class="el" href="debug_8h-source.html#l00254">nlassert</a>, <a class="el" href="stream_8h-source.html#l00058">NLMISC_BSWAP32</a>, <a class="el" href="buf__sock_8h-source.html#l00040">nlnettrace</a>, <a class="el" href="debug_8h-source.html#l00114">nlwarning</a>, <a class="el" href="buf__net__base_8h-source.html#l00143">NLNET::CBufNetBase::receiveQueue</a>, <a class="el" href="buf__net__base_8h-source.html#l00192">NLNET::CBufNetBase::setDataAvailableFlag</a>, and <a class="el" href="buf__net__base_8h-source.html#l00042">NLNET::TSockId</a>. </td> + </tr> +</table> +<a name="b2" doxytag="NLNET::CBufServer::receiveTask"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="classNLNET_1_1CServerReceiveTask.html">CServerReceiveTask</a>* NLNET::CBufServer::receiveTask </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">std::vector< <a class="el" href="classNLMISC_1_1IThread.html">NLMISC::IThread</a> * >::iterator </td> + <td class="mdname1" valign="top" nowrap> <em>ipt</em> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap><code> [inline, protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Returns the receive task corresponding to a particular thread. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00276">276</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00265">CServerReceiveTask</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00261">disconnect</a>, <a class="el" href="buf__server_8cpp-source.html#l00818">dispatchNewSocket</a>, <a class="el" href="buf__server_8cpp-source.html#l00670">getSendQueueSize</a>, <a class="el" href="buf__server_8cpp-source.html#l00623">update</a>, and <a class="el" href="buf__server_8cpp-source.html#l00164">~CBufServer</a>. </td> + </tr> +</table> +<a name="a5" doxytag="NLNET::CBufServer::send"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::send </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="classNLMISC_1_1CMemStream.html">NLMISC::CMemStream</a> & </td> + <td class="mdname" nowrap> <em>buffer</em>, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap><a class="el" href="namespaceNLNET.html#a0">TSockId</a> </td> + <td class="mdname" nowrap> <em>hostid</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Send a message to the specified host, or to all hosts if hostid is InvalidSockId. +<p> + +<p> +Reimplemented in <a class="el" href="classNLNET_1_1CCallbackServer.html#c0">NLNET::CCallbackServer</a>. </td> + </tr> +</table> +<a name="a4" doxytag="NLNET::CBufServer::setConnectionCallback"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::setConnectionCallback </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="namespaceNLNET.html#a2">TNetCallback</a> </td> + <td class="mdname" nowrap> <em>cb</em>, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap>void * </td> + <td class="mdname" nowrap> <em>arg</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sets callback for incoming connections (or NULL to disable callback). +<p> + +<p> +Reimplemented in <a class="el" href="classNLNET_1_1CCallbackServer.html#a4">NLNET::CCallbackServer</a>. +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00181">181</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00341">_ConnectionCallback</a>, <a class="el" href="buf__server_8h-source.html#l00344">_ConnectionCbArg</a>, and <a class="el" href="buf__net__base_8h-source.html#l00047">NLNET::TNetCallback</a>. </td> + </tr> +</table> +<a name="a11" doxytag="NLNET::CBufServer::setSizeFlushTrigger"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::setSizeFlushTrigger </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="namespaceNLNET.html#a0">TSockId</a> </td> + <td class="mdname" nowrap> <em>destid</em>, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap><a class="el" href="memory__common_8h.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>size</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sets the size flush trigger. +<p> +When the size of the send queue reaches or exceeds this calue, all data in the send queue is automatically sent (-1 to disable this trigger ) +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00218">218</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="debug_8h-source.html#l00254">nlassert</a>, and <a class="el" href="buf__net__base_8h-source.html#l00042">NLNET::TSockId</a>. </td> + </tr> +</table> +<a name="a10" doxytag="NLNET::CBufServer::setTimeFlushTrigger"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::setTimeFlushTrigger </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="namespaceNLNET.html#a0">TSockId</a> </td> + <td class="mdname" nowrap> <em>destid</em>, </td> + </tr> + <tr> + <td></td> + <td></td> + <td class="md" nowrap><a class="el" href="memory__common_8h.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>ms</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Sets the time flush trigger (in millisecond). +<p> +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="buf__server_8h-source.html#l00213">213</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +References <a class="el" href="debug_8h-source.html#l00254">nlassert</a>, and <a class="el" href="buf__net__base_8h-source.html#l00042">NLNET::TSockId</a>. </td> + </tr> +</table> +<a name="a8" doxytag="NLNET::CBufServer::update"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLNET::CBufServer::update </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top">) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Update the network (call this method evenly). +<p> + +<p> +Definition at line <a class="el" href="buf__server_8cpp-source.html#l00623">623</a> of file <a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a>. +<p> +References <a class="el" href="buf__server_8h-source.html#l00359">_NbConnections</a>, <a class="el" href="buf__server_8h-source.html#l00338">_ThreadPool</a>, <a class="el" href="buf__server_8h-source.html#l00265">CServerReceiveTask</a>, <a class="el" href="debug_8h-source.html#l00087">nldebug</a>, and <a class="el" href="buf__server_8h-source.html#l00276">receiveTask</a>. </td> + </tr> +</table> +<hr><h2>Friends And Related Function Documentation</h2> +<a name="l1" doxytag="NLNET::CBufServer::CListenTask"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> friend class CListenTask<code> [friend]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00264">264</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00057">CBufServer</a>, and <a class="el" href="buf__server_8cpp-source.html#l00164">~CBufServer</a>. </td> + </tr> +</table> +<a name="l0" doxytag="NLNET::CBufServer::CServerBufSock"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> friend class CServerBufSock<code> [friend]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00263">263</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00374">dataAvailable</a>. </td> + </tr> +</table> +<a name="l2" doxytag="NLNET::CBufServer::CServerReceiveTask"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> friend class CServerReceiveTask<code> [friend]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00265">265</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00910">addNewThread</a>, <a class="el" href="buf__server_8cpp-source.html#l00261">disconnect</a>, <a class="el" href="buf__server_8cpp-source.html#l00818">dispatchNewSocket</a>, <a class="el" href="buf__server_8cpp-source.html#l00670">getSendQueueSize</a>, <a class="el" href="buf__server_8h-source.html#l00276">receiveTask</a>, <a class="el" href="buf__server_8cpp-source.html#l00623">update</a>, and <a class="el" href="buf__server_8cpp-source.html#l00164">~CBufServer</a>. </td> + </tr> +</table> +<hr><h2>Member Data Documentation</h2> +<a name="o10" doxytag="NLNET::CBufServer::_BytesPoppedIn"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a13">uint64</a> NLNET::CBufServer::_BytesPoppedIn<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Number of bytes popped by <a class="el" href="classNLNET_1_1CBufServer.html#a7">receive</a>() since the beginning. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00350">350</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8h-source.html#l00247">bytesReceived</a>, and <a class="el" href="buf__server_8cpp-source.html#l00575">receive</a>. </td> + </tr> +</table> +<a name="o9" doxytag="NLNET::CBufServer::_BytesPushedOut"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a13">uint64</a> NLNET::CBufServer::_BytesPushedOut<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Number of bytes pushed by <a class="el" href="classNLNET_1_1CBufServer.html#a5">send</a>() since the beginning. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00347">347</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8h-source.html#l00253">bytesSent</a>, and <a class="el" href="buf__server_8h-source.html#l00290">pushBufferToHost</a>. </td> + </tr> +</table> +<a name="o7" doxytag="NLNET::CBufServer::_ConnectionCallback"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="namespaceNLNET.html#a2">TNetCallback</a> NLNET::CBufServer::_ConnectionCallback<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Connection callback. +<p> + +<p> +Reimplemented in <a class="el" href="classNLNET_1_1CCallbackServer.html#o0">NLNET::CCallbackServer</a>. +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00341">341</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8h-source.html#l00303">connectionCallback</a>, and <a class="el" href="buf__server_8h-source.html#l00181">setConnectionCallback</a>. </td> + </tr> +</table> +<a name="o8" doxytag="NLNET::CBufServer::_ConnectionCbArg"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void* NLNET::CBufServer::_ConnectionCbArg<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Argument of the connection callback. +<p> + +<p> +Reimplemented in <a class="el" href="classNLNET_1_1CCallbackServer.html#o1">NLNET::CCallbackServer</a>. +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00344">344</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8h-source.html#l00306">argOfConnectionCallback</a>, and <a class="el" href="buf__server_8h-source.html#l00181">setConnectionCallback</a>. </td> + </tr> +</table> +<a name="o4" doxytag="NLNET::CBufServer::_ListenTask"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="classNLNET_1_1CListenTask.html">CListenTask</a>* NLNET::CBufServer::_ListenTask<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Listen task. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00327">327</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00057">CBufServer</a>, <a class="el" href="buf__server_8cpp-source.html#l00092">init</a>, <a class="el" href="buf__server_8h-source.html#l00230">listenAddress</a>, and <a class="el" href="buf__server_8cpp-source.html#l00164">~CBufServer</a>. </td> + </tr> +</table> +<a name="o5" doxytag="NLNET::CBufServer::_ListenThread"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="classNLMISC_1_1IThread.html">NLMISC::IThread</a>* NLNET::CBufServer::_ListenThread<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Listen thread. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00330">330</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00057">CBufServer</a>, <a class="el" href="buf__server_8cpp-source.html#l00092">init</a>, and <a class="el" href="buf__server_8cpp-source.html#l00164">~CBufServer</a>. </td> + </tr> +</table> +<a name="o3" doxytag="NLNET::CBufServer::_MaxSocketsPerThread"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a9">uint16</a> NLNET::CBufServer::_MaxSocketsPerThread<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Max number of sockets handled by one thread. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00324">324</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00818">dispatchNewSocket</a>. </td> + </tr> +</table> +<a name="o2" doxytag="NLNET::CBufServer::_MaxThreads"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a9">uint16</a> NLNET::CBufServer::_MaxThreads<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Max number of threads. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00321">321</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00818">dispatchNewSocket</a>. </td> + </tr> +</table> +<a name="o13" doxytag="NLNET::CBufServer::_NbConnections"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a11">uint32</a> NLNET::CBufServer::_NbConnections<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Number of connections (debug stat). +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00359">359</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8h-source.html#l00259">nbConnections</a>, and <a class="el" href="buf__server_8cpp-source.html#l00623">update</a>. </td> + </tr> +</table> +<a name="o0" doxytag="NLNET::CBufServer::_NoDelay"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLNET::CBufServer::_NoDelay<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +TCP_NODELAY. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00315">315</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8h-source.html#l00268">noDelay</a>. </td> + </tr> +</table> +<a name="o11" doxytag="NLNET::CBufServer::_PrevBytesPoppedIn"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a13">uint64</a> NLNET::CBufServer::_PrevBytesPoppedIn<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Previous number of bytes received. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00353">353</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00709">newBytesReceived</a>. </td> + </tr> +</table> +<a name="o12" doxytag="NLNET::CBufServer::_PrevBytesPushedOut"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="memory__common_8h.html#a13">uint64</a> NLNET::CBufServer::_PrevBytesPushedOut<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Previous number of bytes sent. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00356">356</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00721">newBytesSent</a>. </td> + </tr> +</table> +<a name="o14" doxytag="NLNET::CBufServer::_ReplayMode"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLNET::CBufServer::_ReplayMode<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Replay mode flag. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00362">362</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00057">CBufServer</a>, <a class="el" href="buf__server_8cpp-source.html#l00092">init</a>, and <a class="el" href="buf__server_8cpp-source.html#l00164">~CBufServer</a>. </td> + </tr> +</table> +<a name="o6" doxytag="NLNET::CBufServer::_ThreadPool"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLMISC::CSynchronized<<a class="el" href="namespaceNLNET.html#a7">CThreadPool</a>> NLNET::CBufServer::_ThreadPool<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00338">338</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00261">disconnect</a>, <a class="el" href="buf__server_8cpp-source.html#l00818">dispatchNewSocket</a>, <a class="el" href="buf__server_8cpp-source.html#l00670">getSendQueueSize</a>, <a class="el" href="buf__server_8cpp-source.html#l00623">update</a>, and <a class="el" href="buf__server_8cpp-source.html#l00164">~CBufServer</a>. </td> + </tr> +</table> +<a name="o1" doxytag="NLNET::CBufServer::_ThreadStrategy"></a><p> +<table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr> + <td class="md"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="classNLNET_1_1CBufServer.html#s2">TThreadStategy</a> NLNET::CBufServer::_ThreadStrategy<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Thread socket-handling strategy. +<p> + +<p> +Definition at line <a class="el" href="buf__server_8h-source.html#l00318">318</a> of file <a class="el" href="buf__server_8h-source.html">buf_server.h</a>. +<p> +Referenced by <a class="el" href="buf__server_8cpp-source.html#l00818">dispatchNewSocket</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="buf__server_8h-source.html">buf_server.h</a><li><a class="el" href="buf__server_8cpp-source.html">buf_server.cpp</a></ul> + + +<!-- footer --> +<BR><FONT Size=+5> </FONT> +</TD> +<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD> +</TR> +</TABLE> +</BODY> +</HTML> |