Socket connection with server.
More...
#include <TcpClient.h>
|
int | sock |
| Socket connection with the server.
|
|
std::string | address |
| Address of the server.
|
|
int | port |
| XML-RPC port of the server.
|
|
struct sockaddr_in | server |
| Server/socket information.
|
|
Socket connection with server.
Original version of class by Silver Moon. Last updated on September 11th, 2012. Retrieved from: http://www.binarytides.com/code-a-simple-socket-client-class-in-c/
bool TcpClient::Connect |
( |
std::string |
address, |
|
|
int |
port |
|
) |
| |
Creates a socket connection with the server.
Returns whether the connection was successfully established.
- Parameters
-
address | Address of the server (either hostname or IP address). |
port | XML-RPC port of the server. |
std::string TcpClient::Receive |
( |
int |
size = 512 | ) |
|
Returns data received from the server.
- Parameters
-
size | Size of the message expected. |
bool TcpClient::SearchForCallBacks |
( |
int |
timeout | ) |
|
Wait (timeout) for callbacks from the server.
- Parameters
-
timeout | Timeout in microseconds. |
bool TcpClient::Send |
( |
std::string |
data | ) |
|
Sends an XML message to the server.
Returns whether the message was properly sent.
- Parameters
-
The documentation for this class was generated from the following files:
- /home/travis/build/TheMaximum/mania-pp/src/Socket/TcpClient.h
- /home/travis/build/TheMaximum/mania-pp/src/Socket/TcpClient.cpp