Loading...
Searching...
No Matches
resdb::utxo::UTXOClient Class Reference

#include <utxo_client.h>

Inheritance diagram for resdb::utxo::UTXOClient:
resdb::TransactionConstructor resdb::NetChannel

Public Member Functions

 UTXOClient (const ResDBConfig &config)
 
int Transfer (const UTXO &utxo)
 
std::vector< UTXO > GetList (int64_t end_id, int num)
 
int64_t GetWallet (const std::string &address)
 
- Public Member Functions inherited from resdb::TransactionConstructor
 TransactionConstructor (const ResDBConfig &config)
 
virtual ~TransactionConstructor ()=default
 
int SendRequest (const google::protobuf::Message &message, Request::Type type=Request::TYPE_CLIENT_REQUEST)
 
int SendRequest (const google::protobuf::Message &message, google::protobuf::Message *response, Request::Type type=Request::TYPE_CLIENT_REQUEST)
 
- Public Member Functions inherited from resdb::NetChannel
 NetChannel (const std::string &ip, int port)
 
 NetChannel (std::unique_ptr< Socket > socket, bool connected=false)
 
virtual ~NetChannel ()=default
 
void Close ()
 
void SetSocket (std::unique_ptr< Socket > socket)
 
void SetSignatureVerifier (SignatureVerifier *verifier)
 
void SetDestReplicaInfo (const ReplicaInfo &replica)
 
virtual int SendRequest (const google::protobuf::Message &message, Request::Type cmd, bool need_response=false)
 
virtual int SendRawMessage (const google::protobuf::Message &message)
 
virtual int SendRawMessageData (const std::string &message_str)
 
virtual int RecvRawMessageStr (std::string *message)
 
virtual int RecvRawMessage (google::protobuf::Message *message)
 
virtual int RecvRawMessageData (std::string *message_str)
 
void SetRecvTimeout (int microseconds)
 
void IsLongConnection (bool long_connect_tion)
 
void SetAsyncSend (bool is_async_send)
 

Additional Inherited Members

- Static Public Member Functions inherited from resdb::NetChannel
static std::string GetRawMessageString (const google::protobuf::Message &message, SignatureVerifier *verifier=nullptr)
 
- Protected Member Functions inherited from resdb::NetChannel
int SendDataInternal (const std::string &data)
 
int SendFromKeepAlive (const std::string &data)
 
int Send (const std::string &data)
 
int Recv (std::string *data)
 
int Connect ()
 
- Protected Attributes inherited from resdb::NetChannel
SignatureVerifier * verifier_ = nullptr
 
std::unique_ptr< Socket > socket_
 
int max_retry_time_ = 3
 
std::string ip_
 
int port_
 
bool connected_ = false
 
int read_timeouts_ = 1000000
 
bool long_connect_tion_ = false
 
bool long_connecting_ = false
 
bool is_async_send_ = false
 

Detailed Description

Definition at line 28 of file utxo_client.h.

Constructor & Destructor Documentation

◆ UTXOClient()

resdb::utxo::UTXOClient::UTXOClient ( const ResDBConfig &  config)

Definition at line 29 of file utxo_client.cpp.

Member Function Documentation

◆ GetList()

std::vector< UTXO > resdb::utxo::UTXOClient::GetList ( int64_t  end_id,
int  num 
)

Definition at line 44 of file utxo_client.cpp.

◆ GetWallet()

int64_t resdb::utxo::UTXOClient::GetWallet ( const std::string &  address)

Definition at line 73 of file utxo_client.cpp.

◆ Transfer()

int resdb::utxo::UTXOClient::Transfer ( const UTXO &  utxo)

Definition at line 32 of file utxo_client.cpp.