Public Methods |
void | setTimeOut (int t) |
int | getTimeOut () |
| Get timeout period.
|
void | setClientInfo (struct sockaddr_in *info) |
void | setClientSockFd (int sockfd) |
| CAVERNnet_tcpClient_c () |
| ~CAVERNnet_tcpClient_c () |
void | showStatus (int status, int nbytes) |
| Show status of connection in English.
|
void | close () |
| Close the current client connection.
|
int | connectToServer (char *ip, int port) |
void | showStats (char *streamInfo, char *comment) |
int | logStats (char *streamInfo, char *comment, FILE *filePtr) |
int | sendStats (char *streamInfo, char *comment) |
int | initSendStats (char *monitorClientIP, int port=PERF_DAEMON_DEFAULT_PORT) |
void | exitSendStats () |
void | setInstantaneousLatency (double latency) |
|
unsigned int | getRemoteIP () |
void | getRemoteIP (char *name) |
unsigned int | getSelfIP () |
| Get IP address of self.
|
void | getSelfIP (char *name) |
| Get IP address of self.
|
int | getSelfPort () |
| Get port of self.
|
int | getRemotePort () |
| Get port of client.
|
|
int | read (char *ptr, int *nbytes, int blockingType) |
void | setSockOptions (int option, int buffersize) |
int | isReadyToRead () |
int | isReadyToWrite () |
int | isReady () |
int | write (char *ptr, int *nbytes, int blockingType) |
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().
|
Protected Methods |
void | makeNonBlocking () |
Protected Attributes |
struct sockaddr_in | clientInfo |
int | clientSockFd |
int | clientStatus |
int | timeOutStatus |
int | timeOutPeriod |
CAVERNnet_perfMonitor_c | pmonitor |
Friends |
class | CAVERNnet_tcpServer_c |