async_mqtt 5.0.0
Loading...
Searching...
No Matches
constant.hpp
1// Copyright Takatoshi Kondo 2020
2//
3// Distributed under the Boost Software License, Version 1.0.
4// (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt)
6
7#if !defined(ASYNC_MQTT_CONSTANT_HPP)
8#define ASYNC_MQTT_CONSTANT_HPP
9
10#include <cstddef>
11#include <chrono>
12
13#include <async_mqtt/type.hpp>
14
15namespace async_mqtt {
16
17static constexpr session_expiry_interval_t session_never_expire = 0xffffffffUL;
18static constexpr topic_alias_t topic_alias_max = 0xffff;
19static constexpr std::uint32_t packet_size_no_limit =
20 1 + // fixed header
21 4 + // remaining length
22 128 * 128 * 128 * 128; // maximum value of remainin length
23static constexpr receive_maximum_t receive_maximum_max = 0xffff;
24static constexpr auto shutdown_timeout = std::chrono::seconds(3);
25
26} // namespace async_mqtt
27
28#endif // ASYNC_MQTT_CONSTANT_HPP