10#ifndef OPENCBDC_TX_SRC_WATCHTOWER_CLIENT_H_
11#define OPENCBDC_TX_SRC_WATCHTOWER_CLIENT_H_
44 -> std::shared_ptr<best_block_height_response>;
51 -> std::shared_ptr<status_request_check_success>;
56 std::thread m_client_thread;
86 std::shared_ptr<status_request_check_success>&&)>;
95 std::shared_ptr<best_block_height_response>&&)>;
106 std::thread m_client_thread;
107 std::thread m_handler_thread;
108 bool m_handler_running{
false};
Thread-safe producer-consumer FIFO queue supporting multiple concurrent producers and consumers.
Manages a group of peer s.
Client to asynchronously request information from the watchtower.
auto init() -> bool
Attempts to connect to the watchtower.
void set_block_height_handler(const best_block_height_handler_t &handler)
Sets or replaces the handler for asynchronously delivered StatusUpdateResponses.
void request_status_update(const status_update_request &req)
Sends a StatusUpdateRequest to the Watchtower.
async_client(async_client &&)=delete
void set_status_update_handler(const status_update_response_handler_t &handler)
Sets or replaces the handler for asynchronously delivered StatusUpdateResponses.
auto operator=(const async_client &) -> async_client &=delete
async_client(const async_client &)=delete
void request_best_block_height()
Sends a request_best_block_height to the Watchtower.
auto operator=(async_client &&) -> async_client &=delete
std::function< void( std::shared_ptr< best_block_height_response > &&)> best_block_height_handler_t
std::function< void( std::shared_ptr< status_request_check_success > &&)> status_update_response_handler_t
Client to synchronously request information from the watchtower.
auto operator=(blocking_client &&) -> blocking_client &=delete
blocking_client(blocking_client &&)=delete
auto init() -> bool
Attempts to connect to the watchtower.
auto request_status_update(const status_update_request &req) -> std::shared_ptr< status_request_check_success >
Sends a StatusUpdateRequest to the Watchtower.
blocking_client(const blocking_client &)=delete
auto operator=(const blocking_client &) -> blocking_client &=delete
auto request_best_block_height() -> std::shared_ptr< best_block_height_response >
Sends a request_best_block_height to the Watchtower.
Network request to interact with the Watchtower's status update service.
Tools for reading options from a configuration file and building application-specific parameter sets ...
std::pair< ip_address, port_number_t > endpoint_t
[host name, port number].
Watchtower module to process and cache block history.
Messages clients can use to communicate with the Watchtower.