10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
ServiceConfiguration.h
1
#ifndef TENDUKE_SERVICECONFIGURATION_H
2
#define TENDUKE_SERVICECONFIGURATION_H
3
4
#include "http/HTTPRequest.h"
5
6
#include <chrono>
7
#include <cstddef>
8
9
namespace
tenduke
{
10
14
class
ServiceConfiguration
15
{
16
public
:
25
explicit
ServiceConfiguration
(
26
const
std::chrono::milliseconds &
networkTimeout
= std::chrono::milliseconds(
::tenduke::http::DEFAULT_TIMEOUT_MS
)
27
,
const
std::chrono::milliseconds &
networkConnectionTimeout
= std::chrono::seconds(60)
28
,
const
std::size_t
maxResponseBodySize
=
::tenduke::http::DEFAULT_MAX_RESPONSE_BODY_SIZE
29
) :
networkConnectionTimeout
(
networkConnectionTimeout
)
30
,
networkTimeout
(
networkTimeout
)
31
,
maxResponseBodySize
(
maxResponseBodySize
)
32
{}
33
34
public
:
36
const
std::chrono::milliseconds
networkConnectionTimeout
;
38
const
std::chrono::milliseconds
networkTimeout
;
40
const
std::size_t
maxResponseBodySize
;
41
};
42
43
}
44
45
#endif
//TENDUKE_SERVICECONFIGURATION_H
ServiceConfiguration::ServiceConfiguration
ServiceConfiguration(const std::chrono::milliseconds &networkTimeout=std::chrono::milliseconds(::tenduke::http::DEFAULT_TIMEOUT_MS), const std::chrono::milliseconds &networkConnectionTimeout=std::chrono::seconds(60), const std::size_t maxResponseBodySize=::tenduke::http::DEFAULT_MAX_RESPONSE_BODY_SIZE)
Constructs new instance.
Definition
ServiceConfiguration.h:25
tenduke::ServiceConfiguration::networkTimeout
const std::chrono::milliseconds networkTimeout
Total timeout of a network request, zero for no timeout.
Definition
ServiceConfiguration.h:38
tenduke::ServiceConfiguration::maxResponseBodySize
const std::size_t maxResponseBodySize
Maximum size of a network response body in bytes.
Definition
ServiceConfiguration.h:40
tenduke::ServiceConfiguration::networkConnectionTimeout
const std::chrono::milliseconds networkConnectionTimeout
Network connection timeout, zero for the default of the HTTP library.
Definition
ServiceConfiguration.h:36
tenduke::ServiceConfiguration::ServiceConfiguration
ServiceConfiguration(const std::chrono::milliseconds &networkTimeout=std::chrono::milliseconds(::tenduke::http::DEFAULT_TIMEOUT_MS), const std::chrono::milliseconds &networkConnectionTimeout=std::chrono::seconds(60), const std::size_t maxResponseBodySize=::tenduke::http::DEFAULT_MAX_RESPONSE_BODY_SIZE)
Constructs new instance.
Definition
ServiceConfiguration.h:25
tenduke::http::DEFAULT_MAX_RESPONSE_BODY_SIZE
const std::size_t DEFAULT_MAX_RESPONSE_BODY_SIZE
Default maximum size of a response body in bytes (10 MiB).
Definition
HTTPRequest.h:21
tenduke::http::DEFAULT_TIMEOUT_MS
const long DEFAULT_TIMEOUT_MS
Default total time out in milliseconds.
Definition
HTTPRequest.h:18
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
core
services
common
src
ServiceConfiguration.h
Generated by
1.17.0