nettobac  0.0.0
Network features for FreeBASIC code
nettobacClient Class Reference

The client class, providing nOpen More...

Inheritance diagram for nettobacClient:
Collaboration diagram for nettobacClient:

Public Member Functions

 nettobacClient (BYREF_AS_STRING, BYVAL_AS_USHORT)
 Generate a client instance. More...
 
virtual FUNCTION_AS_n2bConnection_PTR nOpen ()
 Open a client connection to a server. 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...
 

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...
 
- Protected Attributes inherited from n2bFactory
LONG Sock
 The socket to use. More...
 

Detailed Description

The client class, providing nOpen

This class is an instance to act as a client. This is

  • connecting to a server
  • sending data requests
  • receiving returned data

See section nettobacClient for a list of possible error messages.

Since
0.0.0

Definition at line 89 of file nettobac.bi.

Constructor & Destructor Documentation

nettobacClient::nettobacClient ( BYREF_AS_STRING  Uri,
BYVAL_AS_USHORT  Port = 80 
)

Generate a client instance.

Parameters
Urithe URI adress to connect to (ie. "www.freebasic.net")
Portthe port number to use (defaults to 80)

Create a client instance to the specified server adress, resolve its IP and connect to the destination port.

Since
0.0.0

Definition at line 229 of file nettobac.bas.

Member Function Documentation

FUNCTION_AS_n2bConnection_PTR nettobacClient::nOpen ( )
virtual

Open a client connection to a server.

Returns
a newly created connection (or zero on failure)

This function opens a client connection to the server, which was specified in the privious constructor call. The connection is ready to send or receive data.

Use function n2bFactory::nClose() to close the connection.

Since
0.0.0

Implements n2bFactory.

Definition at line 256 of file nettobac.bas.

Here is the caller graph for this function:


The documentation for this class was generated from the following files: