#include <rpc_tls_client.h>
Inherits client::TlsClient, and http::ResponseProcessor.
|
| HttpRpcTlsClient (const std::string &host, const std::string &port, std::shared_ptr<::tls::CA > node_ca=nullptr, std::shared_ptr<::tls::Cert > cert=nullptr, const std::string &key_id_="Invalid") |
|
| HttpRpcTlsClient (const HttpRpcTlsClient &c) |
|
void | create_key_pair (const ccf::crypto::Pem priv_key) |
|
PreparedRpc | gen_request (const std::string &method, const std::span< const uint8_t > params, const std::string &content_type, llhttp_method verb=HTTP_POST, const char *auth_token=nullptr) |
|
Response | call (const std::string &method, const nlohmann::json ¶ms=nullptr, llhttp_method verb=HTTP_POST) |
|
Response | call (const std::string &method, const std::span< const uint8_t > params, llhttp_method verb=HTTP_POST) |
|
Response | post (const std::string &method, const nlohmann::json ¶ms) |
|
Response | get (const std::string &method, const nlohmann::json ¶ms=nullptr) |
|
nlohmann::json | unpack_body (const Response &resp) |
|
std::string | get_error (const Response &resp) |
|
Response | read_response () |
|
std::optional< Response > | read_response_non_blocking () |
|
virtual void | handle_response (ccf::http_status status, ccf::http::HeaderMap &&headers, std::vector< uint8_t > &&body) override |
|
void | set_prefix (const std::string &prefix_) |
|
| TlsClient (const std::string &host, const std::string &port, std::shared_ptr<::tls::CA > node_ca=nullptr, std::shared_ptr<::tls::Cert > cert=nullptr) |
|
| TlsClient (const TlsClient &c) |
|
| TlsClient (const std::string &host, const std::string &port, std::shared_ptr<::tls::CA > node_ca=nullptr, std::shared_ptr<::tls::Cert > cert=nullptr) |
|
| TlsClient (const TlsClient &c) |
|
virtual | ~TlsClient () |
|
auto | get_ciphersuite_name () |
|
void | write (std::span< const uint8_t > b) |
|
std::vector< uint8_t > | read (size_t read_size) |
|
bool | bytes_available () |
|
std::vector< uint8_t > | read_all () |
|
void | set_tcp_nodelay (bool on) |
|
|
std::vector< uint8_t > | gen_http_request_internal (const std::string &method, const std::span< const uint8_t > params, const std::string &content_type, llhttp_method verb, const char *auth_token=nullptr) |
|
std::vector< uint8_t > | gen_request_internal (const std::string &method, const std::span< const uint8_t > params, const std::string &content_type, llhttp_method verb, const char *auth_token=nullptr) |
|
Response | call_raw (const std::vector< uint8_t > &raw) |
|
Response | call_raw (const PreparedRpc &prep) |
|
void | init () |
|
◆ HttpRpcTlsClient() [1/2]
client::HttpRpcTlsClient::HttpRpcTlsClient |
( |
const std::string & |
host, |
|
|
const std::string & |
port, |
|
|
std::shared_ptr<::tls::CA > |
node_ca = nullptr , |
|
|
std::shared_ptr<::tls::Cert > |
cert = nullptr , |
|
|
const std::string & |
key_id_ = "Invalid" |
|
) |
| |
|
inline |
◆ HttpRpcTlsClient() [2/2]
◆ call() [1/2]
Response client::HttpRpcTlsClient::call |
( |
const std::string & |
method, |
|
|
const nlohmann::json & |
params = nullptr , |
|
|
llhttp_method |
verb = HTTP_POST |
|
) |
| |
|
inline |
◆ call() [2/2]
Response client::HttpRpcTlsClient::call |
( |
const std::string & |
method, |
|
|
const std::span< const uint8_t > |
params, |
|
|
llhttp_method |
verb = HTTP_POST |
|
) |
| |
|
inline |
◆ call_raw() [1/2]
◆ call_raw() [2/2]
Response client::HttpRpcTlsClient::call_raw |
( |
const std::vector< uint8_t > & |
raw | ) |
|
|
inlineprotected |
◆ create_key_pair()
void client::HttpRpcTlsClient::create_key_pair |
( |
const ccf::crypto::Pem |
priv_key | ) |
|
|
inline |
◆ gen_http_request_internal()
std::vector< uint8_t > client::HttpRpcTlsClient::gen_http_request_internal |
( |
const std::string & |
method, |
|
|
const std::span< const uint8_t > |
params, |
|
|
const std::string & |
content_type, |
|
|
llhttp_method |
verb, |
|
|
const char * |
auth_token = nullptr |
|
) |
| |
|
inlineprotected |
◆ gen_request()
PreparedRpc client::HttpRpcTlsClient::gen_request |
( |
const std::string & |
method, |
|
|
const std::span< const uint8_t > |
params, |
|
|
const std::string & |
content_type, |
|
|
llhttp_method |
verb = HTTP_POST , |
|
|
const char * |
auth_token = nullptr |
|
) |
| |
|
inline |
◆ gen_request_internal()
std::vector< uint8_t > client::HttpRpcTlsClient::gen_request_internal |
( |
const std::string & |
method, |
|
|
const std::span< const uint8_t > |
params, |
|
|
const std::string & |
content_type, |
|
|
llhttp_method |
verb, |
|
|
const char * |
auth_token = nullptr |
|
) |
| |
|
inlineprotected |
◆ get()
Response client::HttpRpcTlsClient::get |
( |
const std::string & |
method, |
|
|
const nlohmann::json & |
params = nullptr |
|
) |
| |
|
inline |
◆ get_error()
std::string client::HttpRpcTlsClient::get_error |
( |
const Response & |
resp | ) |
|
|
inline |
◆ handle_response()
◆ post()
Response client::HttpRpcTlsClient::post |
( |
const std::string & |
method, |
|
|
const nlohmann::json & |
params |
|
) |
| |
|
inline |
◆ read_response()
Response client::HttpRpcTlsClient::read_response |
( |
| ) |
|
|
inline |
◆ read_response_non_blocking()
std::optional< Response > client::HttpRpcTlsClient::read_response_non_blocking |
( |
| ) |
|
|
inline |
◆ set_prefix()
void client::HttpRpcTlsClient::set_prefix |
( |
const std::string & |
prefix_ | ) |
|
|
inline |
◆ TlsClient() [1/2]
client::TlsClient::TlsClient |
( |
const std::string & |
host, |
|
|
const std::string & |
port, |
|
|
std::shared_ptr<::tls::CA > |
node_ca = nullptr , |
|
|
std::shared_ptr<::tls::Cert > |
cert = nullptr |
|
) |
| |
|
inline |
◆ TlsClient() [2/2]
client::TlsClient::TlsClient |
( |
const TlsClient & |
c | ) |
|
|
inline |
◆ unpack_body()
nlohmann::json client::HttpRpcTlsClient::unpack_body |
( |
const Response & |
resp | ) |
|
|
inline |
◆ key_id
std::string client::HttpRpcTlsClient::key_id = "Invalid" |
|
protected |
◆ key_pair
◆ last_response
std::optional<Response> client::HttpRpcTlsClient::last_response |
|
protected |
◆ next_recv_id
size_t client::HttpRpcTlsClient::next_recv_id = 0 |
|
protected |
◆ next_send_id
size_t client::HttpRpcTlsClient::next_send_id = 0 |
|
protected |
◆ parser
◆ prefix
std::optional<std::string> client::HttpRpcTlsClient::prefix |
|
protected |
The documentation for this class was generated from the following file: