#include <tcp_client_iface.hpp>
Inheritance diagram for cpp_redis::network::tcp_client_iface:
Detailed Description
interface defining how tcp client should be implemented to be used inside cpp_redis
Member Typedef Documentation
◆ async_read_callback_t
async read completion callbacks function takingread_result as a parameter
◆ async_write_callback_t
async write completion callbacks function takingwrite_result as a parameter
◆ disconnection_handler_t
Member Function Documentation
◆ async_read()
virtual void cpp_redis::network::tcp_client_iface::async_read | ( | read_request & | request | ) | |
| pure virtual |
async read operation
- Parameters
request | information about what should be read and what should be done after completion |
Implemented incpp_redis::network::tcp_client.
◆ async_write()
virtual void cpp_redis::network::tcp_client_iface::async_write | ( | write_request & | request | ) | |
| pure virtual |
async write operation
- Parameters
request | information about what should be written and what should be done after completion |
Implemented incpp_redis::network::tcp_client.
◆ connect()
virtual void cpp_redis::network::tcp_client_iface::connect | ( | const std::string & | addr, | | | std::uint32_t | port, | | | std::uint32_t | timeout_msecs =0 | | ) | | |
| pure virtual |
start the tcp client
- Parameters
addr | host to be connected to |
port | port to be connected to |
timeout_msecs | max time to connect in ms |
Implemented incpp_redis::network::tcp_client.
◆ disconnect()
virtual void cpp_redis::network::tcp_client_iface::disconnect | ( | bool | wait_for_removal =false | ) | |
| pure virtual |
stop the tcp client
- Parameters
wait_for_removal | when sets to true, disconnect blocks until the underlying TCP client has been effectively removed from the io_service and that all the underlying callbacks have completed. |
Implemented incpp_redis::network::tcp_client.
◆ is_connected()
virtual bool cpp_redis::network::tcp_client_iface::is_connected | ( | void | | ) | const |
| pure virtual |
◆ set_on_disconnection_handler()
virtual void cpp_redis::network::tcp_client_iface::set_on_disconnection_handler | ( | constdisconnection_handler_t & | disconnection_handler | ) | |
| pure virtual |
set on disconnection handler
- Parameters
disconnection_handler | handler to be called in case of a disconnection |
Implemented incpp_redis::network::tcp_client.
The documentation for this class was generated from the following file: