Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
TCPSocketTest::Client Class Reference
Inheritance diagram for TCPSocketTest::Client:
Inheritance graph
[legend]

Public Member Functions

 Client (int port)
 
bool setup ()
 
void setupClientBeforeServer ()
 
bool waitForClientSetupThread ()
 
- Public Member Functions inherited from urcl::comm::TCPSocket
void close ()
 Closes the connection to the socket. More...
 
std::string getIP () const
 Determines the local IP address of the currently configured socket. More...
 
int 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 (std::chrono::seconds 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 ()
 

Protected Member Functions

virtual bool open (int socket_fd, struct sockaddr *address, size_t address_len)
 
- Protected Member Functions inherited from urcl::comm::TCPSocket
virtual void setOptions (int socket_fd)
 
bool setup (std::string &host, int port)
 

Private Member Functions

void setupClient (int port)
 

Private Attributes

std::thread client_setup_thread_
 
bool done_setting_up_client_
 
int port_
 

Additional Inherited Members

- Protected Attributes inherited from urcl::comm::TCPSocket
std::unique_ptr< timeval > recv_timeout_
 

Detailed Description

Definition at line 101 of file test_tcp_socket.cpp.

Constructor & Destructor Documentation

◆ Client()

TCPSocketTest::Client::Client ( int  port)
inline

Definition at line 104 of file test_tcp_socket.cpp.

Member Function Documentation

◆ open()

virtual bool TCPSocketTest::Client::open ( int  socket_fd,
struct sockaddr *  address,
size_t  address_len 
)
inlineprotectedvirtual

Reimplemented from urcl::comm::TCPSocket.

Definition at line 140 of file test_tcp_socket.cpp.

◆ setup()

bool TCPSocketTest::Client::setup ( )
inline

Definition at line 109 of file test_tcp_socket.cpp.

◆ setupClient()

void TCPSocketTest::Client::setupClient ( int  port)
inlineprivate

Definition at line 150 of file test_tcp_socket.cpp.

◆ setupClientBeforeServer()

void TCPSocketTest::Client::setupClientBeforeServer ( )
inline

Definition at line 115 of file test_tcp_socket.cpp.

◆ waitForClientSetupThread()

bool TCPSocketTest::Client::waitForClientSetupThread ( )
inline

Definition at line 121 of file test_tcp_socket.cpp.

Member Data Documentation

◆ client_setup_thread_

std::thread TCPSocketTest::Client::client_setup_thread_
private

Definition at line 146 of file test_tcp_socket.cpp.

◆ done_setting_up_client_

bool TCPSocketTest::Client::done_setting_up_client_
private

Definition at line 148 of file test_tcp_socket.cpp.

◆ port_

int TCPSocketTest::Client::port_
private

Definition at line 147 of file test_tcp_socket.cpp.


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 Tue Jul 4 2023 02:09:47