|
| Client (int port, const std::string &ip="127.0.0.1") |
|
bool | setup (const size_t max_num_tries=0, const std::chrono::milliseconds reconnection_time=std::chrono::seconds(10)) |
|
void | setupClientBeforeServer (const size_t max_num_tries=0, const std::chrono::milliseconds reconnection_time=std::chrono::seconds(10)) |
|
bool | waitForClientSetupThread () |
|
void | close () |
| Closes the connection to the socket. More...
|
|
std::string | getIP () const |
| Determines the local IP address of the currently configured socket. More...
|
|
socket_t | getSocketFD () |
| Getter for the file descriptor of the socket. More...
|
|
SocketState | getState () |
| Getter for the state of the socket. More...
|
|
bool | read (char *character) |
| Reads one byte from the socket. More...
|
|
bool | read (uint8_t *buf, const size_t buf_len, size_t &read) |
| Reads data from the socket. More...
|
|
void | setReceiveTimeout (const timeval &timeout) |
| Setup Receive timeout used for this socket. More...
|
|
void | setReconnectionTime (const std::chrono::milliseconds reconnection_time) |
| Set reconnection time, if the server is unavailable during connection this will set the time before trying connect to the server again. More...
|
|
| TCPSocket () |
| Creates a TCPSocket object. More...
|
|
bool | write (const uint8_t *buf, const size_t buf_len, size_t &written) |
| Writes to the socket. More...
|
|
virtual | ~TCPSocket () |
|
|
void | setupClient (int port, const size_t max_num_tries=0, std::chrono::milliseconds reconnection_time=std::chrono::seconds(10)) |
|
Definition at line 106 of file test_tcp_socket.cpp.
◆ Client()
TCPSocketTest::Client::Client |
( |
int |
port, |
|
|
const std::string & |
ip = "127.0.0.1" |
|
) |
| |
|
inline |
◆ setup()
bool TCPSocketTest::Client::setup |
( |
const size_t |
max_num_tries = 0 , |
|
|
const std::chrono::milliseconds |
reconnection_time = std::chrono::seconds(10) |
|
) |
| |
|
inline |
◆ setupClient()
void TCPSocketTest::Client::setupClient |
( |
int |
port, |
|
|
const size_t |
max_num_tries = 0 , |
|
|
std::chrono::milliseconds |
reconnection_time = std::chrono::seconds(10) |
|
) |
| |
|
inlineprivate |
◆ setupClientBeforeServer()
void TCPSocketTest::Client::setupClientBeforeServer |
( |
const size_t |
max_num_tries = 0 , |
|
|
const std::chrono::milliseconds |
reconnection_time = std::chrono::seconds(10) |
|
) |
| |
|
inline |
◆ waitForClientSetupThread()
bool TCPSocketTest::Client::waitForClientSetupThread |
( |
| ) |
|
|
inline |
◆ client_setup_thread_
std::thread TCPSocketTest::Client::client_setup_thread_ |
|
private |
◆ done_setting_up_client_
bool TCPSocketTest::Client::done_setting_up_client_ |
|
private |
◆ ip_
std::string TCPSocketTest::Client::ip_ |
|
private |
◆ port_
int TCPSocketTest::Client::port_ |
|
private |
The documentation for this class was generated from the following file:
ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Mon May 26 2025 02:35:58