lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
lintel::ClientConfiguration Class Reference

#include <ClientConfiguration.h>

Public Member Functions

 ClientConfiguration (std::string host, int32_t port, std::chrono::milliseconds readTimeOut, std::chrono::milliseconds writeTimeOut, std::chrono::milliseconds connectionTimeout, std::filesystem::path certFile="", std::filesystem::path keyFile="", std::filesystem::path caCertFile="")
 
const std::string & getHost () const
 
constexpr int32_t getPort () const
 
const std::chrono::milliseconds & getReadTimeOut () const
 
const std::chrono::milliseconds & getWriteTimeOut () const
 
const std::chrono::milliseconds & getConnectionTimeout () const
 
const std::filesystem::path & getCertFile () const
 
const std::filesystem::path & getKeyFile () const
 
const std::filesystem::path & getCaCertFile () const
 

Friends

std::ostream & operator<< (std::ostream &os, const ClientConfiguration &configuration)
 

Detailed Description

Configuration for an HTTP client (host, port, timeouts, TLS)

Constructor & Destructor Documentation

◆ ClientConfiguration()

lintel::ClientConfiguration::ClientConfiguration ( std::string  host,
int32_t  port,
std::chrono::milliseconds  readTimeOut,
std::chrono::milliseconds  writeTimeOut,
std::chrono::milliseconds  connectionTimeout,
std::filesystem::path  certFile = "",
std::filesystem::path  keyFile = "",
std::filesystem::path  caCertFile = "" 
)
Parameters
hostremote host
portremote port
readTimeOutread timeout
writeTimeOutwrite timeout
connectionTimeoutconnection timeout
certFileoptional TLS certificate file
keyFileoptional TLS key file
caCertFileoptional TLS CA certificate file used to verify the server certificate

Member Function Documentation

◆ getCaCertFile()

const std::filesystem::path & lintel::ClientConfiguration::getCaCertFile ( ) const
Returns
the TLS CA certificate file path

◆ getCertFile()

const std::filesystem::path & lintel::ClientConfiguration::getCertFile ( ) const
Returns
the TLS certificate file path

◆ getConnectionTimeout()

const std::chrono::milliseconds & lintel::ClientConfiguration::getConnectionTimeout ( ) const
Returns
the connection timeout

◆ getHost()

const std::string & lintel::ClientConfiguration::getHost ( ) const
Returns
the host address

◆ getKeyFile()

const std::filesystem::path & lintel::ClientConfiguration::getKeyFile ( ) const
Returns
the TLS key file path

◆ getPort()

constexpr int32_t lintel::ClientConfiguration::getPort ( ) const
inlineconstexpr
Returns
the port number

◆ getReadTimeOut()

const std::chrono::milliseconds & lintel::ClientConfiguration::getReadTimeOut ( ) const
Returns
the read timeout

◆ getWriteTimeOut()

const std::chrono::milliseconds & lintel::ClientConfiguration::getWriteTimeOut ( ) const
Returns
the write timeout

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const ClientConfiguration &  configuration 
)
friend

Print configuration to stream


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