#include <socketTCP.h>
Public Member Functions | |
TCPClient (string ip, int port) | |
Constructor. | |
int | send (string &message) |
Send a message. | |
int | receive (string &message) |
Wait until a message is received and return the message. | |
int | checkMessagePresence (void) |
Check if a message is available for reception. |
TCPClient::TCPClient | ( | string | ip, | |
int | port | |||
) |
Constructor.
[in] | ip | IP of the machine where SwarmSim runs. |
[in] | ip | port used by SwarmSim. |
int TCPClient::send | ( | string & | message | ) |
Send a message.
[in] | message | The message to send. |
int TCPClient::receive | ( | string & | message | ) |
Wait until a message is received and return the message.
[out] | message | The received message. |
int TCPClient::checkMessagePresence | ( | void | ) |
Check if a message is available for reception.