Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
kcenon::network::protocols::grpc::call_options Struct Reference

Options for individual RPC calls. More...

#include <client.h>

Collaboration diagram for kcenon::network::protocols::grpc::call_options:
Collaboration graph

Public Member Functions

template<typename Duration >
void set_timeout (Duration timeout)
 Set deadline from timeout duration.
 

Public Attributes

std::optional< std::chrono::system_clock::time_point > deadline
 Deadline for this call.
 
grpc_metadata metadata
 Metadata to send with the request.
 
bool wait_for_ready = false
 Whether to wait for the server to be ready.
 
std::string compression_algorithm
 Compression algorithm to use.
 

Detailed Description

Options for individual RPC calls.

Definition at line 78 of file client.h.

Member Function Documentation

◆ set_timeout()

template<typename Duration >
void kcenon::network::protocols::grpc::call_options::set_timeout ( Duration timeout)
inline

Set deadline from timeout duration.

Parameters
timeoutTimeout duration

Definition at line 97 of file client.h.

98 {
99 deadline = std::chrono::system_clock::now() +
100 std::chrono::duration_cast<std::chrono::system_clock::duration>(timeout);
101 }
std::optional< std::chrono::system_clock::time_point > deadline
Deadline for this call.
Definition client.h:81

References deadline.

Member Data Documentation

◆ compression_algorithm

std::string kcenon::network::protocols::grpc::call_options::compression_algorithm

Compression algorithm to use.

Definition at line 90 of file client.h.

◆ deadline

std::optional<std::chrono::system_clock::time_point> kcenon::network::protocols::grpc::call_options::deadline

Deadline for this call.

Definition at line 81 of file client.h.

Referenced by set_timeout().

◆ metadata

grpc_metadata kcenon::network::protocols::grpc::call_options::metadata

Metadata to send with the request.

Definition at line 84 of file client.h.

◆ wait_for_ready

bool kcenon::network::protocols::grpc::call_options::wait_for_ready = false

Whether to wait for the server to be ready.

Definition at line 87 of file client.h.


The documentation for this struct was generated from the following file: