C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
caf::net::dsl::client_config::lazy Class Reference

Configuration for a client that creates the socket on demand. More...

#include <client_config.hpp>

Inheritance diagram for caf::net::dsl::client_config::lazy:
caf::net::dsl::has_ctx

Public Types

using server_t = std::variant< server_address, uri >
 Type for holding a client address.
 
- Public Types inherited from caf::net::dsl::has_ctx
using ctx_ptr = std::shared_ptr< ssl::context >
 

Public Member Functions

 lazy (std::string host, uint16_t port)
 
 lazy (const uri &addr)
 
- Public Member Functions inherited from caf::net::dsl::has_ctx
 has_ctx (ctx_ptr ptr)
 
 has_ctx (has_ctx &&)=default
 
 has_ctx (const has_ctx &)=default
 
has_ctxoperator= (has_ctx &&)=default
 
has_ctxoperator= (const has_ctx &)=default
 
template<class F >
auto connection_with_ctx (F &&f)
 Returns a function that, when called with a stream_socket, calls f either with a new SSL connection from ctx or with the file the file descriptor if no SSL context is defined.
 
template<class F >
auto acceptor_with_ctx (F &&f)
 Returns a function that, when called with an accept socket, calls f either with a new SSL acceptor from ctx or with the file the file descriptor if no SSL context is defined.
 

Public Attributes

server_t server
 The address for reaching the server or an error.
 
timespan retry_delay = std::chrono::seconds{1}
 The delay between connection attempts.
 
timespan connection_timeout = infinite
 The timeout when trying to connect.
 
size_t max_retry_count = 0
 The maximum amount of retries.
 
- Public Attributes inherited from caf::net::dsl::has_ctx
std::shared_ptr< ssl::contextctx
 SSL context for secure servers.
 

Static Public Attributes

static constexpr std::string_view name = "lazy"
 

Additional Inherited Members

- Static Public Member Functions inherited from caf::net::dsl::has_ctx
template<class SumType >
static has_ctxfrom (SumType &data) noexcept
 
template<class SumType >
static const has_ctxfrom (const SumType &data) noexcept
 

Detailed Description

Configuration for a client that creates the socket on demand.


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