From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/classNLNET_1_1CListenSock.html | 385 ++++++++++++++++++++++++ 1 file changed, 385 insertions(+) create mode 100644 docs/doxygen/nel/classNLNET_1_1CListenSock.html (limited to 'docs/doxygen/nel/classNLNET_1_1CListenSock.html') diff --git a/docs/doxygen/nel/classNLNET_1_1CListenSock.html b/docs/doxygen/nel/classNLNET_1_1CListenSock.html new file mode 100644 index 00000000..451fe4b3 --- /dev/null +++ b/docs/doxygen/nel/classNLNET_1_1CListenSock.html @@ -0,0 +1,385 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NLNET::CListenSock Class Reference

CListenSock: listening socket for servers. +More... +

+#include <listen_sock.h> +

+

Inheritance diagram for NLNET::CListenSock: +

+ +NLNET::CTcpSock +NLNET::CSock + +List of all members. + + + + + + + + + + + + + + + + + +

Public Methods

 CListenSock ()
 Constructor. More...

CTcpSockaccept ()
 Blocks until an incoming connection is requested, accepts it, and creates a new socket (you have to delete it after use). More...

Socket setup
void init (uint16 port)
 Prepares to receive connections on a specified port (bind+listen). More...

void init (const CInetAddress &addr)
 Prepares to receive connections on a specified address/port (useful when the host has several addresses). More...

void setBacklog (sint backlog)
 Sets the number of the pending connections queue, or -1 for the maximum possible value. More...

sint backlog () const
 Returns the pending connections queue. More...


Private Attributes

bool _Bound
sint _BackLog
+

Detailed Description

+CListenSock: listening socket for servers. +

+How to accept connections in a simple server:

    +
  1. Create a CListenSock object
  2. Listen on the port you want the clients to connect
  3. In a loop, accept a connection and store the new socket
+
+Author:
+Olivier Cado , Nevrax France
+Date:
+2000-2001
+

+ +

+Definition at line 47 of file listen_sock.h.


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NLNET::CListenSock::CListenSock  
+
+ + + + + +
+   + + +

+Constructor. +

+ +

+Definition at line 62 of file listen_sock.cpp. +

+References NLNET::CSock::createSocket, and setBacklog.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + +
CTcpSock * NLNET::CListenSock::accept  
+
+ + + + + +
+   + + +

+Blocks until an incoming connection is requested, accepts it, and creates a new socket (you have to delete it after use). +

+ +

+Definition at line 128 of file listen_sock.cpp. +

+References NLNET::CSock::_Sock, NLNET::CTcpSock::CTcpSock, and nldebug.

+

+ + + + +
+ + + + + + + + + +
sint NLNET::CListenSock::backlog   const [inline]
+
+ + + + + +
+   + + +

+Returns the pending connections queue. +

+ +

+Definition at line 67 of file listen_sock.h. +

+References _BackLog, and sint. +

+Referenced by setBacklog.

+

+ + + + +
+ + + + + + + + + + +
void NLNET::CListenSock::init const CInetAddress  addr
+
+ + + + + +
+   + + +

+Prepares to receive connections on a specified address/port (useful when the host has several addresses). +

+ +

+Definition at line 92 of file listen_sock.cpp. +

+References _BackLog, _Bound, NLNET::CSock::_LocalAddr, NLNET::CSock::_Sock, and nldebug.

+

+ + + + +
+ + + + + + + + + + +
void NLNET::CListenSock::init uint16   port
+
+ + + + + +
+   + + +

+Prepares to receive connections on a specified port (bind+listen). +

+ +

+Definition at line 75 of file listen_sock.cpp. +

+References NLNET::CSock::_LocalAddr, NLNET::CSock::_Sock, nldebug, and uint16.

+

+ + + + +
+ + + + + + + + + + +
void NLNET::CListenSock::setBacklog sint   backlog
+
+ + + + + +
+   + + +

+Sets the number of the pending connections queue, or -1 for the maximum possible value. +

+ +

+Definition at line 157 of file listen_sock.cpp. +

+References _BackLog, NLNET::CSock::_Sock, backlog, and sint. +

+Referenced by CListenSock.

+


Member Data Documentation

+

+ + + + +
+ + +
sint NLNET::CListenSock::_BackLog [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 78 of file listen_sock.h. +

+Referenced by backlog, init, and setBacklog.

+

+ + + + +
+ + +
bool NLNET::CListenSock::_Bound [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 76 of file listen_sock.h. +

+Referenced by init.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1