The server class, providing nOpen
More...
Public Member Functions | |
nettobacServer (BYVAL_AS_USHORT, BYVAL_AS_INTEGER) | |
Generate a server instance. More... | |
virtual FUNCTION_AS_n2bConnection_PTR | nOpen () |
Open a server connection to a client. More... | |
Public Member Functions inherited from n2bFactory | |
n2bFactory () | |
Constructor to open the socket. More... | |
virtual | ~n2bFactory () |
Destructor to close all opened connections and the socket. More... | |
FUNCTION_AS_CONST_ZSTRING_CONST_PTR | nClose (BYVAL_AS_n2bConnection_PTR) |
Close a connection. More... | |
Protected Attributes | |
timeval | Timeout |
The timeout value to abort slow or impossible transmissions. More... | |
Protected Attributes inherited from n2bFactory | |
LONG | Sock |
The socket to use. More... | |
Additional Inherited Members | |
Public Attributes inherited from n2bFactory | |
ZSTRING_PTR | Errr |
The common error message (NULL in case of no error) More... | |
n2bConnection_PTR | Slots [ANY] |
The array to store open connections. More... | |
Protected Member Functions inherited from n2bFactory | |
FUNCTION_AS_n2bConnection_PTR | slot (BYVAL_AS_LONG) |
Generate a new connection and add the instance to array Slots. More... | |
The server class, providing nOpen
This class is an instance to act as a server. This is
See section nettobacServer for a list of possible error messages.
Definition at line 109 of file nettobac.bi.
nettobacServer::nettobacServer | ( | BYVAL_AS_USHORT | Port = 80 , |
BYVAL_AS_INTEGER | Max = 64 |
||
) |
Generate a server instance.
Port | the port number to use (defaults to 80) |
Max | The maximum number of client connections |
Create a server instance for a limited number of clients and start listening on the specified port.
Definition at line 271 of file nettobac.bas.
|
virtual |
Open a server connection to a client.
This function opens a connection to a client, if a request is pending. It opens a new n2bConnection to the client and returns its pointer. Otherwise it returns 0 (zero), meaning there is no client connection request pending.
Use function n2bFactory::nClose() to close the connection.
BASE
class n2bFactory will close all remaining connections in its destructor, so it's optional to call function n2bFactory::nClose().Implements n2bFactory.
Definition at line 306 of file nettobac.bas.
|
protected |
The timeout value to abort slow or impossible transmissions.
Definition at line 114 of file nettobac.bi.