|
My Project
|
Public Member Functions | |
| TcpClient () | |
| TcpClient (std::string host, unsigned port) | |
| virtual | ~TcpClient () |
| int | connectToServer (bool doWait) |
| int | connectToServer (std::string host, unsigned port, bool doWait) |
| void | setBlocking (bool doWait) |
| void | setHost (std::string host) |
| void | setPort (unsigned port) |
| int | connect () |
| void | disconnect () |
| bool | isConnected () |
| std::string | getHost () |
| unsigned int | getPort () |
Public Member Functions inherited from gcp::util::Port | |
| Port (int fd=-1) | |
| virtual | ~Port () |
| int | getFd () |
| void | writeString (std::string &message, int fd=-1) |
| void | writeBytes (Vector< unsigned char > &buffer) |
| unsigned int | readBytes (unsigned char *message, int fd=-1) |
| unsigned int | readBytes (Vector< unsigned char > &buffer) |
| unsigned char | getNextByte () |
| std::string | readString (int fd=-1) |
| bool | concatenateString (std::ostringstream &os, int fd=-1, bool cont=true) |
| void | concatenateChar (std::ostringstream &os, int fd=-1) |
| int | getNbyte (int fd=-1) |
| void | terminateAt (std::string strip) |
| void | strip (std::string strip) |
| void | dontStrip (std::string strip) |
| void | stripUnprintable (bool strip) |
| void | append (std::string append) |
| void | setNoBuf () |
| void | setLineBuf () |
Additional Inherited Members | |
Static Public Member Functions inherited from gcp::util::Port | |
| static void | writeBytes (Vector< unsigned char > &buffer, int fd) |
Static Public Attributes inherited from gcp::util::Port | |
| static const unsigned int | MAX_RCV_BUFFER = 300 |
| static const unsigned | TELNET_PORT_NO = 23 |
Protected Attributes inherited from gcp::util::Port | |
| int | fd_ |
| TcpClient::TcpClient | ( | ) |
Constructor with no preset host or port.
....................................................................... Constructor.
| TcpClient::TcpClient | ( | std::string | host, |
| unsigned | port | ||
| ) |
Constructor with host and port
....................................................................... Constructor.
|
virtual |
Destructor.
....................................................................... Destructor.
|
inlinevirtual |
Connect
Reimplemented from gcp::util::Port.
| int TcpClient::connectToServer | ( | bool | doWait | ) |
Attempt to get a connection to the server.
....................................................................... Connect to the server
| int TcpClient::connectToServer | ( | std::string | host, |
| unsigned | port, | ||
| bool | doWait | ||
| ) |
Attempt to get a connection to the server.
....................................................................... Constructor.
| void TcpClient::disconnect | ( | ) |
Disconnect
....................................................................... Disconnect the connection to the control-program control port.
| bool TcpClient::isConnected | ( | ) |
Return true if we are connected
....................................................................... Return true if we are connected
| void TcpClient::setBlocking | ( | bool | doWait | ) |
Configure the socket managed by this class for blocking/non-blocking I/O
....................................................................... Configure the socket managed by this class for blocking/non-blocking I/O
| void TcpClient::setHost | ( | std::string | host | ) |
Set the host
....................................................................... Set the host
| void TcpClient::setPort | ( | unsigned | port | ) |
Set the port number.
....................................................................... Set the port