class CAVERNnet_tcpReflectorClient_c Client specifically for use with CAVERNnet_tcpReflector_c
|
| CAVERNnet_tcpReflectorClient_c (CAVERNnet_tcpClient_c *) Use this constructor if you have a pre-opened socket. |
| | read (char** ret, int* nbytes, int blockingType) Read data from a reflector (if available) |
| | write (char *outgoingData, int* nbytes) Write data to the reflector |
| | isReadyToRead () Determines if a socket has data available to read |
| | isReadyToWrite () Determines if a socket is ready to write |
| | isReady () Determines if a socket is ready to write or read or both |
|
| showStatus (int status, int nbytes) Show status of connection in English. |
|
| close () Close the current client connection. |
| | connectToServer (char *ip, int port=CAVERNnet_tcpReflector_c::DEFAULT_PORT) Connect to a server |
| | setTimeOut (int timeout=CAVERNnet_tcpReflectorClient_c::NO_TIME_OUT) Set timeout for read and writes |
| | showStats (char* streamInfo, char* comment) Displays the resultant statistics instantaneously in the netlogger format - this should be typically done after a read/write is done a network |
| | logStats (char* streamInfo, char* comment, FILE* filePtr) This logs performance statistics in a file |
| | sendStats (char* streamInfo, char* comment) Sends the performance statistics to a remote perfdaemon -for further analysis of the monitored data - the initSendStats API should be called first, before calling a sendStats (In order to connect to the perfdaemon initially) (Note: A typical example of sendStats is given in the (CAVERN_DISTRIB_DIR/demos/tcpreflector/ directory)
|
| | initSendStats (char* monitorClientIP, int port = PERF_DAEMON_DEFAULT_PORT) Initialize sendStats - provide the IP of the perfDaemon and an optional port number to connect to |
|
| exitSendStats () Properly delete the perfDaemonClient after sendStats is done |
| |
| ||||||||||||||||||
|
| Accessor functions
|
Client specifically for use with CAVERNnet_tcpReflector_c. Use this only to communicate with the reflector. Do not use the CAVERNnet_tcpClient_c class.
Also, it should be noted that a showStats call should be made at the end of atleast one send and receive for two-way information (the same applies for logStats and sendStats)
(Note: A typical example of sendStats is given in the (CAVERN_DISTRIB_DIR/demos/tcpreflector/ directory)
int write(char *outgoingData, int* nbytes)
nbytes - set to size of the buffer refered to by outgoingData
int isReadyToRead()
int isReadyToWrite()
int isReady()
unsigned int getRemoteIP()
void getRemoteIP(char* name)
int connectToServer(char *ip, int port=CAVERNnet_tcpReflector_c::DEFAULT_PORT)
port - Port to connect to.
void setTimeOut(int timeout=CAVERNnet_tcpReflectorClient_c::NO_TIME_OUT)
void showStats(char* streamInfo, char* comment)
comment -
A comment on the event that marks the time at which the stream is being monitored
int logStats(char* streamInfo, char* comment, FILE* filePtr)
comment -
A comment on the event that marks the time at which the stream is being monitored
filePtr -
File pointer to the file in which the results of monitoring are to be stored
int sendStats(char* streamInfo, char* comment)
comment -
A comment on the event that marks the time at which the stream is being monitored
int initSendStats(char* monitorClientIP, int port = PERF_DAEMON_DEFAULT_PORT)
port -
Port number at which the perfDaemon is running -this is optional. The default port number for perfDaemon is 9500 -so a different port number has to be specified if the perfDaemon is running on a different port.
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