cpp-msgpack-rpc
0.2.0
An RPC library implementing MessagePack RPC.
Toggle main menu visibility
Loading...
Searching...
No Matches
reconnection_config.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 MusicScience37 (Kenta Kabashima)
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
20
#pragma once
21
22
#include <chrono>
23
24
#include "msgpack_rpc/impl/msgpack_rpc_export.h"
25
26
namespace
msgpack_rpc::config
{
27
31
class
MSGPACK_RPC_EXPORT
ReconnectionConfig
{
32
public
:
36
ReconnectionConfig
();
37
44
ReconnectionConfig
&
initial_waiting_time
(std::chrono::nanoseconds value);
45
51
[[nodiscard]] std::chrono::nanoseconds
initial_waiting_time
()
52
const
noexcept
;
53
60
ReconnectionConfig
&
max_waiting_time
(std::chrono::nanoseconds value);
61
67
[[nodiscard]] std::chrono::nanoseconds
max_waiting_time
()
const
noexcept
;
68
75
ReconnectionConfig
&
max_jitter_waiting_time
(std::chrono::nanoseconds value);
76
82
[[nodiscard]] std::chrono::nanoseconds
max_jitter_waiting_time
()
83
const
noexcept
;
84
85
private
:
87
std::chrono::nanoseconds
initial_waiting_time_
;
88
90
std::chrono::nanoseconds
max_waiting_time_
;
91
93
std::chrono::nanoseconds
max_jitter_waiting_time_
;
94
};
95
96
}
// namespace msgpack_rpc::config
msgpack_rpc::config::ReconnectionConfig::initial_waiting_time
ReconnectionConfig & initial_waiting_time(std::chrono::nanoseconds value)
Set the initial waiting time.
Definition
reconnection_config.cpp:49
msgpack_rpc::config::ReconnectionConfig::initial_waiting_time_
std::chrono::nanoseconds initial_waiting_time_
Initial waiting time.
Definition
reconnection_config.h:87
msgpack_rpc::config::ReconnectionConfig::max_waiting_time
ReconnectionConfig & max_waiting_time(std::chrono::nanoseconds value)
Set the maximum waiting time.
Definition
reconnection_config.cpp:64
msgpack_rpc::config::ReconnectionConfig::max_jitter_waiting_time
ReconnectionConfig & max_jitter_waiting_time(std::chrono::nanoseconds value)
Set the maximum jitter of waiting time.
Definition
reconnection_config.cpp:78
msgpack_rpc::config::ReconnectionConfig::ReconnectionConfig
ReconnectionConfig()
Constructor.
Definition
reconnection_config.cpp:43
msgpack_rpc::config::ReconnectionConfig::max_waiting_time_
std::chrono::nanoseconds max_waiting_time_
Maximum waiting time.
Definition
reconnection_config.h:90
msgpack_rpc::config::ReconnectionConfig::max_jitter_waiting_time_
std::chrono::nanoseconds max_jitter_waiting_time_
Maximum jitter of waiting time.
Definition
reconnection_config.h:93
msgpack_rpc::config
Namespace of configurations.
Definition
client_config.h:32
include
msgpack_rpc
config
reconnection_config.h
Generated on
for cpp-msgpack-rpc by
1.18.0