NetConnectionList Struct Reference

#include <netstructs.h>

Collaboration diagram for NetConnectionList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NetConnectionList (int max=253)
 NetConnectionList (void *data)
void * getData ()
 
Returns:
a pointer to the whole data, that is transfered over the network

IPaddress * get (int i)
void set (IPaddress a, int i)
int size ()
Uint32 count ()
 
Returns:
the number of list entries


Detailed Description

Used to transcieve data with a list of connections, in order to tell others, who is here on the network. This struct is compatible to NetBasicData, to get the type.
Warning:
do not send this struct as it is! use getData(), when sending the list; and the constructor (void *data) when recieving


Constructor & Destructor Documentation

NetConnectionList::NetConnectionList ( int  max = 253  )  [inline]

Constructor.

Parameters:
max specifies the maximum number of addresses to store (space will be reserved accordingly)

NetConnectionList::NetConnectionList ( void *  data  )  [inline]

Constructor to use, when data is availible and has to be read/modified.

Parameters:
data pointer to the data, in the format of NetConnectionList


Member Function Documentation

IPaddress* NetConnectionList::get ( int  i  )  [inline]

Use this together with size() when transmitting the struct's content over the network.

Parameters:
i the number of the address in the list to read
Returns:
a pointer to the IP address

void NetConnectionList::set ( IPaddress  a,
int  i 
) [inline]

Changes a list entry to the given address

Parameters:
a the address to store (in NBO)
i the number of the address in the list to write to (in OSBO)
Warning:
be sure to have enough memory allocated when creating the struct, there is no memory check here.

int NetConnectionList::size (  )  [inline]

Use this together with get(int) when transmitting the struct's content over the network.

Returns:
the size of the data that is used (in bytes).


The documentation for this struct was generated from the following file:
Generated on Wed May 9 17:36:30 2007 for netrinjo by  doxygen 1.5.1