OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
cbdc::watchtower::blocking_client Class Reference

Client to synchronously request information from the watchtower. More...

#include <client.hpp>

Public Member Functions

 blocking_client ()=delete
 
 blocking_client (network::endpoint_t ep)
 Constructor.
 
auto init () -> bool
 Attempts to connect to the watchtower.
 
 ~blocking_client ()
 
 blocking_client (const blocking_client &)=delete
 
auto operator= (const blocking_client &) -> blocking_client &=delete
 
 blocking_client (blocking_client &&)=delete
 
auto operator= (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.
 
auto request_status_update (const status_update_request &req) -> std::shared_ptr< status_request_check_success >
 Sends a StatusUpdateRequest to the Watchtower.
 

Detailed Description

Client to synchronously request information from the watchtower.

Definition at line 22 of file uhs/atomizer/watchtower/client.hpp.

Constructor & Destructor Documentation

◆ blocking_client() [1/4]

cbdc::watchtower::blocking_client::blocking_client ( )
delete

◆ blocking_client() [2/4]

cbdc::watchtower::blocking_client::blocking_client ( network::endpoint_t ep)
explicit

Constructor.

Parameters
epWatchtower endpoint.

Definition at line 14 of file uhs/atomizer/watchtower/client.cpp.

◆ ~blocking_client()

cbdc::watchtower::blocking_client::~blocking_client ( )

Definition at line 17 of file uhs/atomizer/watchtower/client.cpp.

References cbdc::network::connection_manager::close().

Here is the call graph for this function:

◆ blocking_client() [3/4]

cbdc::watchtower::blocking_client::blocking_client ( const blocking_client & )
delete

◆ blocking_client() [4/4]

cbdc::watchtower::blocking_client::blocking_client ( blocking_client && )
delete

Member Function Documentation

◆ init()

auto cbdc::watchtower::blocking_client::init ( ) -> bool

Attempts to connect to the watchtower.

Returns
true if the connection was successful.

Definition at line 22 of file uhs/atomizer/watchtower/client.cpp.

◆ operator=() [1/2]

auto cbdc::watchtower::blocking_client::operator= ( blocking_client && ) -> blocking_client &=delete
delete

◆ operator=() [2/2]

auto cbdc::watchtower::blocking_client::operator= ( const blocking_client & ) -> blocking_client &=delete
delete

◆ request_best_block_height()

auto cbdc::watchtower::blocking_client::request_best_block_height ( ) -> std::shared_ptr<best_block_height_response>

Sends a request_best_block_height to the Watchtower.

Blocks until the Watchtower sends a response.

Returns
the response from the Watchtower.

Definition at line 44 of file uhs/atomizer/watchtower/client.cpp.

References cbdc::make_shared_buffer().

Here is the call graph for this function:

◆ request_status_update()

auto cbdc::watchtower::blocking_client::request_status_update ( const status_update_request & req) -> std::shared_ptr<status_request_check_success>

Sends a StatusUpdateRequest to the Watchtower.

Blocks until the Watchtower sends a response.

Parameters
reqrequest to send to the Watchtower.
Returns
the response from the Watchtower.

Definition at line 59 of file uhs/atomizer/watchtower/client.cpp.

References cbdc::make_shared_buffer().

Here is the call graph for this function:

The documentation for this class was generated from the following files: