TCPClient Class Reference
[Internet protocol sockets]

#include <socketTCP.h>

Inheritance diagram for TCPClient:

MIPObject

List of all members.

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.


Constructor & Destructor Documentation

TCPClient::TCPClient ( string  ip,
int  port 
)

Constructor.

Parameters:
[in] ip IP of the machine where SwarmSim runs.
[in] ip port used by SwarmSim.


Member Function Documentation

int TCPClient::send ( string &  message  ) 

Send a message.

Returns:
The number of sent bytes
Parameters:
[in] message The message to send.

int TCPClient::receive ( string &  message  ) 

Wait until a message is received and return the message.

Returns:
The number of received bytes
Parameters:
[out] message The received message.

int TCPClient::checkMessagePresence ( void   ) 

Check if a message is available for reception.

Returns:
A positive number if a message is available.


The documentation for this class was generated from the following files:

Generated on Mon Feb 20 07:01:10 2017 for MIP by  doxygen 1.5.6