class CAVERNplus_tcpServer_c : public CAVERNplus_socketbase_c

TCP Class for creating servers

Inheritance:


Public Methods

CAVERNplus_tcpClient_c* checkForNewConnections ()
Check to see if there is a request from clients for connection
void close ()
Close the server port.
int getSelfIP ()
Get server's IP.
int getSelfPort ()
Get server's port.
int getTimeOut ()
Get timeout period.
int init (int port)
Open the server on a port
void setTimeOut (int t)
Set timeout period when performing read() or write() operations

Inherited from CAVERNplus_socketbase_c:

Public Methods

void expandHostName(char *src, char *newname, int len)
double getAverageReceiveBandwidth()
double getAverageSendBandwidth()
void getHostName(char *name, int len)
double getInstantReceiveBandwidth()
double getInstantSendBandwidth()
double getTimeInSecs()
unsigned long getTotalDataReceived()
unsigned long getTotalDataSent()
int hostnameToIP(char *hostname, char* hostIP)
void ipNumToString(unsigned int ip, char *ipstring)
void showStats()

Documentation

TCP Class for creating servers. This class bypasses CAVERN's standard method for establishing connections and provides the user with direct control of TCP connections.
void setTimeOut(int t)
Set timeout period when performing read() or write() operations
Parameters:
t - Time out period in seconds. Set to CAVERNplus_tcpClient_c::NO_TIME_OUT to set no time out period.

int init(int port)
Open the server on a port. Typically after this call you sit in a loop and call checkForNewConnections to wait for incoming connections.
Returns:
0 if failed, 1 if success

CAVERNplus_tcpClient_c* checkForNewConnections()
Check to see if there is a request from clients for connection. If yes then return a CAVERNplus_tcpClient_c object which you can then use to talk to the client.
See Also:
CAVERNplus_tcpClient_c class.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de