Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

QUANTAnet_extendedTcpClient_c Class Reference

#include <QUANTAnet_extendedTcp_c.hxx>

Inheritance diagram for QUANTAnet_extendedTcpClient_c:

QUANTAnet_tcpClient_c QUANTAnet_socketbase_c List of all members.

Detailed Description

This class is designed to help users minimize their effort of packing and unpacking numerical values every time they need to send one.

All methods provided in this class will pack values before writing them to the network. Again, all methods available in this class will unpack all values gotten from the network before returning them to the users. This class is derived from QUANTAnet_tcp_c class and thus, compatible with the class. So it is possible to use QUANTAnet_extendedTcpClient_c in a machine and use QUANTAnet_tcp_c class in the other, or vice versa; you are just losing the convenience of using simple methods provided in this class in return and you have to pack and unpack by yourself. If you want to use this class in the server side, make sure to create an instance of QUANTAnet_extendedTcpServer_c class instead of QUANTAnet_tcpServer_c since QUANTAnet_extendedTcpServer_c gives you access to all methods available in this client class.


Public Member Functions

int readChar (char &value, int blockingType)
 reads a character
int writeChar (char value, int blockingType)
 writes a character
int readInt (int &value, int blockingType)
 reads an integer value
int readIntArray (int *intArray, int size, int blockingType)
 reads a number of integer values
int writeInt (int value, int blockingType)
 writes an integer value
int writeIntArray (int *intArray, int size, int blockingType)
 writes a number of integer values
int readInt32 (int32 &value, int blockingType)
 reads a 32-bit integer value
int readInt32Array (int32 *int32Array, int size, int blockingType)
 reads a number of 32-bit integer values
int writeInt32 (int32 value, int blockingType)
 writes a 32-bit integer value
int writeInt32Array (int32 *int32Array, int size, int blockingType)
 writes a number of 32-bit integer values
int readInt64 (int64 &value, int blockingType)
 reads a 64-bit integer value
int readInt64Array (int64 *int64Array, int size, int blockingType)
 reads a number of 64-bit integer values
int writeInt64 (int64 value, int blockingType)
 writes a 64-bit integer value
int writeInt64Array (int64 *int64Array, int size, int blockingType)
 writes a number of 64-bit integer values
int readLong (long &value, int blockingType)
 reads a long integer value
int readLongArray (long *longArray, int size, int blockingType)
 reads a number of long integer values
int writeLong (long value, int blockingType)
 writes a long integer value
int writeLongArray (long *longArray, int size, int blockingType)
 writes a number of long integer values
int readFloat (float &value, int blockingType)
 reads a single precision floating point value
int readFloatArray (float *floatArray, int size, int blockingType)
 reads a number of float values
int writeFloat (float value, int blockingType)
 writes a float value
int writeFloatArray (float *floatArray, int size, int blockingType)
 writes a number of float values
int readDouble (double &value, int blockingType)
 reads a double precision floating point value
int readDoubleArray (double *doubleArray, int size, int blockingType)
 reads a number of double values
int writeDouble (double value, int blockingType)
 writes an integer value
int writeDoubleArray (double *doubleArray, int size, int blockingType)
 writes a number of double values
void setTimeOut (int t)
 Set timeout period when performing read() or write() operations.
int getTimeOut ()
 Get timeout period.
void setClientInfo (struct sockaddr_in *info)
 Set client info.
void setClientSockFd (int sockfd)
 Set client socket.
unsigned int getTotalDataSent ()
 Get the total data sent by a connection.
unsigned int getTotalDataRead ()
 Get total data received by a connection.
double getInstantReceiveBandwidth ()
 Get total instantaneous incoming bandwidth by a connection.
double getInstantSendBandwidth ()
 Get total instantaneous outgoing bandwidth by a connection.
double getAverageReceiveBandwidth ()
 Get average incoming bandwidth by a connection.
double getAverageSendBandwidth ()
 Get average outgoing bandwidth by a connection.
void setInstantLatency (double lat)
 Set the instantaneous latency and also calculate the STALatency and Jitter values automatically.
double getInstantLatency ()
 Retrieve most recent incoming packet's latency.
double getAverageLatency ()
 Retrieve average incoming latency.
double getMaxLatency ()
 Retrieve max latency so far.
double getMinLatency ()
 Retrieve min latency so far.
void incrementDataSent (unsigned long size)
 Record amount of data sent.
void incrementDataRead (unsigned long size)
 Record amount of data read - and also compute instantaneous, average bandwidths along with the inter message delay values.
double getInstantInterMesgDelay ()
 Get instantaneous inter-message delay (jitter).
double getMaxInterMesgDelay ()
 Get max inter-message delay (jitter).
double getMinInterMesgDelay ()
 Get min inter-message delay (jitter).
double getAverageInterMesgDelay ()
 Get average inter-message delay (jitter).
double getSTABandwidth ()
 Get the Short Term Average Bandwidth -over a fixed number of packets (defined by BANDWIDTH_BUF_SIZE).
double getSTALatency ()
 Get the Short Term Average Latency -over a number of packets (defined by LATENCY_BUF_SIZE).
double getBurstiness ()
 get the burstinesss
double getJitter ()
 Get the Jitter.
unsigned long getPacketsRead ()
 Return the total number of packets read.
unsigned long getPacketsSent ()
 Return the total number of packets sent.
unsigned int getRemoteIP ()
 Get the IP address of remote connection.
void getRemoteIP (char *name)
 Get the IP address of remote connection.
int getSelfPort ()
 Get port of self.
int getRemotePort ()
 Get port of client.
int getSocketId ()
 Get socket id.
Read and Write calls.
int read (char *ptr, int *nbytes, int blockingType)
void setSockOptions (int option, int buffersize)
 Allows you to change the parameters to the setsockopt() options.Currently this member allows you to change socket buffer size.
int isReadyToRead ()
 Determines if a socket has data available to read.
int isReadyToWrite ()
 Determines if a socket is ready to write.
int isReady ()
 Determines if a socket is ready to write or read or both.
int write (const char *ptr, int *nbytes, int blockingType)
 Write data to socket.
void showStatus (int status, int nbytes)
 Show status of connection in English.
int close ()
 Close the current client connection.
int connectToServer (const char *ip, int port)
 Connect to a server.
void 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 over a network.
int logStats (char *streamInfo, char *comment, FILE *filePtr)
 This logs performance statistics in a file.
int 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).
int initSendStats (const char *monitorClientIP, int port=PERF_DAEMON_DEFAULT_PORT)
 Initialize sendStats - provide the IP of the perfDaemon and an optional port number to connect to.
void exitSendStats ()
 Properly delete the perFDaemon Client after sendStats is done.
int readv (QUANTAnet_iovec_c q_iovec, int blockingType)
int writev (QUANTAnet_iovec_c q_iovec, int blockingType)
unsigned int getRemoteIP ()
 Get the IP address of remote connection.
void getRemoteIP (char *name)
 Get the IP address of remote connection.
int getSelfPort ()
 Get port of self.
int getRemotePort ()
 Get port of client.
int getSocketId ()
 Get socket id.
Read and Write calls.
int read (char *ptr, int *nbytes, int blockingType)
void setSockOptions (int option, int buffersize)
 Allows you to change the parameters to the setsockopt() options.Currently this member allows you to change socket buffer size.
int isReadyToRead ()
 Determines if a socket has data available to read.
int isReadyToWrite ()
 Determines if a socket is ready to write.
int isReady ()
 Determines if a socket is ready to write or read or both.
int write (const char *ptr, int *nbytes, int blockingType)
 Write data to socket.
void showStatus (int status, int nbytes)
 Show status of connection in English.
int close ()
 Close the current client connection.
int connectToServer (const char *ip, int port)
 Connect to a server.
void 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 over a network.
int logStats (char *streamInfo, char *comment, FILE *filePtr)
 This logs performance statistics in a file.
int 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).
int initSendStats (const char *monitorClientIP, int port=PERF_DAEMON_DEFAULT_PORT)
 Initialize sendStats - provide the IP of the perfDaemon and an optional port number to connect to.
void exitSendStats ()
 Properly delete the perFDaemon Client after sendStats is done.
int readv (QUANTAnet_iovec_c q_iovec, int blockingType)
int writev (QUANTAnet_iovec_c q_iovec, int blockingType)

Static Public Member Functions

int hostnameToIP (const char *hostname, char *hostIP)
 Convert a hostname to an ip address of xxx.xxx.xxx.xxx.
void ipNumToString (unsigned int ip, char *ipstring)
 Convert ip address to a string of xxx.xxx.xxx.xxx.
double getTimeInSecs ()
 Get time in secs with microsecond accuracy.
void getHostName (char *name, int len)
 Get the full host name of a local client.
void expandHostName (const char *src, char *newname, int len)
 If hostname is not fully expanded (ie does not include its domain) then expand it.
long getSelfIP ()
 Get the host IP address as a long integer.
void getSelfIP (char *)
 Get the host IP address as a character string.
int selectSock (void *ptr, int *status, int numSocks, struct timeval *timeout)
 Returns the status of the sockets being polled.

Static Public Attributes

const int BLOCKING
 Make the connection blocking but time out eventually.
const int NON_BLOCKING
 Make the connection non blocking.
const int NO_TIME_OUT
 Used to set time out period to never time out.
const int DEFAULT_TIME_OUT
 Default time out is no time out.
const int SOCKET_NOT_OPEN
 Socket is not open.
const int CONNECTION_TERMINATED
 Connection you attempted to read/write is terminated.
const int NON_BLOCKING_HAS_NO_DATA
 You attempted to read with non blocking and there was not data.
const int TIMED_OUT
 The read/write timed out.
const int OK
 Read/Write succeeded.
const int NON_BLOCKING_NOT_READY_TO_WRITE
 You attempted to write with non blocking and socket was not ready.
const int NOT_READY
 Socket was not ready.
const int READY_TO_READ
 Socket ready to read.
const int READY_TO_WRITE
 Socket ready to write.
const int READY_TO_READ_AND_WRITE
 Socket ready to read and write.
const int READ_BUFFER_SIZE
 Change the socket buffer size before Read().
const int WRITE_BUFFER_SIZE
 Change the socket buffer size before Write().
const int FAILED
 Operation failed.
const int BLOCKING
 Make the connection blocking but time out eventually.
const int NON_BLOCKING
 Make the connection non blocking.
const int NO_TIME_OUT
 Used to set time out period to never time out.
const int DEFAULT_TIME_OUT
 Default time out is no time out.
const int SOCKET_NOT_OPEN
 Socket is not open.
const int CONNECTION_TERMINATED
 Connection you attempted to read/write is terminated.
const int NON_BLOCKING_HAS_NO_DATA
 You attempted to read with non blocking and there was not data.
const int TIMED_OUT
 The read/write timed out.
const int OK
 Read/Write succeeded.
const int NON_BLOCKING_NOT_READY_TO_WRITE
 You attempted to write with non blocking and socket was not ready.
const int NOT_READY
 Socket was not ready.
const int READY_TO_READ
 Socket ready to read.
const int READY_TO_WRITE
 Socket ready to write.
const int READY_TO_READ_AND_WRITE
 Socket ready to read and write.
const int READ_BUFFER_SIZE
 Change the socket buffer size before Read().
const int WRITE_BUFFER_SIZE
 Change the socket buffer size before Write().
const int FAILED
 Operation failed.

Protected Member Functions

void computeInstantSendBandwidth ()
 Calculate the instantaneous outgoing bandwidth.
void computeInstantReceiveBandwidth ()
 Calculate the instantaneous incoming bandwidth.
void computeAverageReceiveBandwidth ()
 Calculate the average incoming bandwidth.
void computeAverageSendBandwidth ()
 Calculate the average outgoing bandwidth.
void calculateJitter (double lat)
 Calculate the jitter over a specified number of packets.
void calculateBurstiness (double bw)
 Calculate the burstiness over a specified number of packets.


Member Function Documentation

int QUANTAnet_tcpClient_c::connectToServer const char *  ip,
int  port
[inherited]
 

Connect to a server.

Returns:
A negative number(that is returned by a socket sonnect() call if failed. Else returns client's socket file descriptor. (note: the return value in the previous versions was a zero in case of an error - this has been changed to a negative value from version 1.2)

void QUANTAnet_tcpClient_c::getRemoteIP char *  name  )  [inherited]
 

Get the IP address of remote connection.

If you are a client this returns the ip of the destination server. If you are a server this returns the ip of the destination client.

unsigned int QUANTAnet_tcpClient_c::getRemoteIP  )  [inherited]
 

Get the IP address of remote connection.

If you are a client this returns the ip of the destination server. If you are a server this returns the ip of the destination client.

int QUANTAnet_tcpClient_c::initSendStats const char *  monitorClientIP,
int  port = PERF_DAEMON_DEFAULT_PORT
[inherited]
 

Initialize sendStats - provide the IP of the perfDaemon and an optional port number to connect to.

This should be done initially before using the sendStats API.

Parameters:
monitorClientIP IP address of the perfDameon to connect to
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 ona different port.
Returns:
Either QUANTAnet_perfMonitor_c::OK or QUANTAnet_perfMonitor_c::FAILED

int QUANTAnet_tcpClient_c::isReady  )  [inherited]
 

Determines if a socket is ready to write or read or both.

Returns:
Either: QUANTAnet_tcpClient_c::NOT_READY or QUANTAnet_tcpClient_c::READY_TO_WRITE or QUANTAnet_tcpClient_c::READY_TO_READ or QUANTAnet_tcpClient_c::READY_TO_READ_AND_WRITE

int QUANTAnet_tcpClient_c::isReadyToRead  )  [inherited]
 

Determines if a socket has data available to read.

Returns:
Either: QUANTAnet_tcpClient_c::NOT_READY or QUANTAnet_tcpClient_c::READY_TO_READ

int QUANTAnet_tcpClient_c::isReadyToWrite  )  [inherited]
 

Determines if a socket is ready to write.

Returns:
Either: QUANTAnet_tcpClient_c::NOT_READY or QUANTAnet_tcpClient_c::READY_TO_WRITE

int QUANTAnet_tcpClient_c::logStats char *  streamInfo,
char *  comment,
FILE *  filePtr
[inherited]
 

This logs performance statistics in a file.

The user opens a file and passes the file pointer with this function and results of monitoring are written into the logfile.

Parameters:
streamInfo A label describing the stream that is being monitored.
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
Returns:
Either QUANTAnet_perfMonitor_c::OK or QUANTAnet_perfMonitor_c::FAILED

int QUANTAnet_tcpClient_c::read char *  ptr,
int *  nbytes,
int  blockingType
[inherited]
 

Parameters:
nbytes Fill nbytes with num bytes you want to read. nbytes will return with number of bytes successfully read.
blockingtype BLOCKING means that it will block waiting for data or until the timeout period expires. Change the timeout period by calling setTimeOut().
NON_BLOCKING means that if there is no data to be read this call will return immediately. If it does get some data it will keep reading until the specified number of bytes is received, or if it timesout, or if the connection is broken. In the latter two cases the number of bytes it was able to read is returned.

In either the BLOCKING or NON_BLOCKING case you can set the time out period to never time out by setting the timeout time to: NO_TIME_OUT.

Returns:
SOCKET_NOT_OPEN, NON_BLOCKING_HAS_NO_DATA, TIMED_OUT, CONNECTION_TERMINATED, OK, errno

int QUANTAnet_extendedTcpClient_c::readChar char &  value,
int  blockingType
 

reads a character

Parameters:
value character you want to write to the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readDouble double &  value,
int  blockingType
 

reads a double precision floating point value

Parameters:
value double value you want to read from the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readDoubleArray double *  doubleArray,
int  size,
int  blockingType
 

reads a number of double values

Parameters:
doubleArray array of double values to store the values read from network stream
size the number of double values you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readFloat float &  value,
int  blockingType
 

reads a single precision floating point value

Parameters:
value float value you want to read from the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readFloatArray float *  floatArray,
int  size,
int  blockingType
 

reads a number of float values

Parameters:
floatArray array of float values that store the values read from network stream
size the number of float values you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readInt int &  value,
int  blockingType
 

reads an integer value

Parameters:
value integer value you want to read from the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readInt32 int32 &  value,
int  blockingType
 

reads a 32-bit integer value

Parameters:
value 32-bit integer value that will be read from the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readInt32Array int32 *  int32Array,
int  size,
int  blockingType
 

reads a number of 32-bit integer values

Parameters:
int32Array array of 32-bit integers to store the values read from network stream
size the number of 32-bit integers you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readInt64 int64 &  value,
int  blockingType
 

reads a 64-bit integer value

Parameters:
value 64-bit integer value that will be read from the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readInt64Array int64 *  int64Array,
int  size,
int  blockingType
 

reads a number of 64-bit integer values

Parameters:
int64Array array of 64-bit integers to store the values read from network stream
size the number of 64-bit integers you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readIntArray int *  intArray,
int  size,
int  blockingType
 

reads a number of integer values

Parameters:
intArray array of integers to store the values read from network stream
size the number of integers you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readLong long &  value,
int  blockingType
 

reads a long integer value

Parameters:
value long integer value you want to read from the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::readLongArray long *  longArray,
int  size,
int  blockingType
 

reads a number of long integer values

Parameters:
longArray array of long integers to store the values read from network stream
size the number of long integers you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_tcpClient_c::readv QUANTAnet_iovec_c  q_iovec,
int  blockingType
[inherited]
 

Parameters:
q_iovec QUANTAnet_iovec_c
blockingtype QUANTAnet_tcpClient_c::BLOCKING or, NON_BLOCKING
Returns:
1 if succed, or errno if fails comment:readv gives bad address error when iovec pointer is not initialized.

int QUANTAnet_tcpClient_c::sendStats char *  streamInfo,
char *  comment
[inherited]
 

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).

Parameters:
streamInfo A label describing the stream that is being monitored.
comment A comment on the event that marks the time at which the stream is being monitored
Returns:
Either QUANTAnet_perfMonitor_c::OK or QUANTAnet_perfMonitor_c::FAILED

void QUANTAnet_tcpClient_c::setClientInfo struct sockaddr_in *  info  )  [inline, inherited]
 

Set client info.

For internal use.

Parameters:
info client information

void QUANTAnet_tcpClient_c::setClientSockFd int  sockfd  )  [inline, inherited]
 

Set client socket.

For internal use.

Parameters:
sockfd client socket

void QUANTAnet_tcpClient_c::setSockOptions int  option,
int  buffersize
[inherited]
 

Allows you to change the parameters to the setsockopt() options.Currently this member allows you to change socket buffer size.

Parameters:
option Specify QUANTAnet_tcpClient_c::READ_BUFFER_SIZE if you want to change the size of the receive buffer. Specify QUANTAnet_tcpClient_c::WRITE_BUFFER_SIZE if you want to change the size of the send buffer
buffersize Specify the size.

void QUANTAnet_tcpClient_c::setTimeOut int  t  )  [inline, inherited]
 

Set timeout period when performing read() or write() operations.

Parameters:
t Time out period in seconds. Set to QUANTAnet_tcpClient_c::NO_TIME_OUT to set no time out period.

void QUANTAnet_tcpClient_c::showStats char *  streamInfo,
char *  comment
[inherited]
 

Displays the resultant statistics instantaneously in the netlogger format - this should be typically done after a read/write is done over a network.

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)

Parameters:
streamInfo A label describing the stream that is being monitored.
comment A comment on the event that marks the time at which the stream is being monitored

int QUANTAnet_tcpClient_c::write const char *  ptr,
int *  nbytes,
int  blockingType
[inherited]
 

Write data to socket.

Returns:
SOCKET_NOT_OPEN, NON_BLOCKING_NOT_READY_TO_WRITE, TIMED_OUT, CONNECTION_TERMINATED, OK

int QUANTAnet_extendedTcpClient_c::writeChar char  value,
int  blockingType
 

writes a character

Parameters:
value character that is going to be read from the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeDouble double  value,
int  blockingType
 

writes an integer value

Parameters:
value double value that is going to be written to the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeDoubleArray double *  doubleArray,
int  size,
int  blockingType
 

writes a number of double values

Parameters:
doubleArray double values that will be sent to the network stream
size the number of double values you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeFloat float  value,
int  blockingType
 

writes a float value

Parameters:
value float value that is going to be written to the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeFloatArray float *  floatArray,
int  size,
int  blockingType
 

writes a number of float values

Parameters:
floatArray float values that will be sent to the network stream
size the number of float values you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeInt int  value,
int  blockingType
 

writes an integer value

Parameters:
value integer value that is going to be written to the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeInt32 int32  value,
int  blockingType
 

writes a 32-bit integer value

Parameters:
value 32-bit integer value that is going to be written to the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeInt32Array int32 *  int32Array,
int  size,
int  blockingType
 

writes a number of 32-bit integer values

Parameters:
int32Array 32-bit integer values that will be sent to the network stream
size the number of 32-bit integers you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeInt64 int64  value,
int  blockingType
 

writes a 64-bit integer value

Parameters:
value 64-bit integer that is going to be written to the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeInt64Array int64 *  int64Array,
int  size,
int  blockingType
 

writes a number of 64-bit integer values

Parameters:
int64Array 64-bit integer values that will be sent to the network stream
size the number of 64-bit integers you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeIntArray int *  intArray,
int  size,
int  blockingType
 

writes a number of integer values

Parameters:
intArray integer values that will be sent to the network stream
size the number of integers you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeLong long  value,
int  blockingType
 

writes a long integer value

Parameters:
value long integer value that is going to be written to the network stream
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_extendedTcpClient_c::writeLongArray long *  longArray,
int  size,
int  blockingType
 

writes a number of long integer values

Parameters:
longArray long integer values that will be sent to the network stream
size the number of long integers you want to send
blockingType either QUANTAnet_tcpClient_c::BLOCKING for blocking operation or QUANTAnet_tcpClient_c::NON_BLOCKING for non-blocking operation

int QUANTAnet_tcpClient_c::writev QUANTAnet_iovec_c  q_iovec,
int  blockingType
[inherited]
 

Parameters:
q_iovec QUANTAnet_iovec_c
blockingtype QUANTAnet_tcpClient_c::BLOCKING or, NON_BLOCKING
Returns:
1 if succed, or errno if fails comment:writev gives invalid argument error when iovec length is not initialized.


The documentation for this class was generated from the following file:
Generated on Tue Jun 6 16:06:25 2006 for QUANTA by doxygen 1.3.8