RESTinio
|
A guard class for setting chunk size. More...
#include <sendfile.hpp>
Public Member Functions | |
constexpr | sendfile_chunk_size_guarded_value_t (file_size_t chunk_size_value) noexcept |
constexpr auto | value () const noexcept |
Get the valid value of a chunk size. More... | |
Static Private Member Functions | |
static constexpr file_size_t | clarify_chunk_size (file_size_t chunk_size_value) noexcept |
Checks chunk_size_value and returns a value in [1, sendfile_max_chunk_size]. More... | |
Private Attributes | |
const file_size_t | m_chunk_size |
Valid value of the chunk size. More... | |
A guard class for setting chunk size.
If chunk_size_value does not fit in [1, sendfile_max_chunk_size]. interval then it is shrinked to fit in the interval.
Definition at line 64 of file sendfile.hpp.
|
inlineconstexprnoexcept |
Definition at line 86 of file sendfile.hpp.
|
inlinestaticconstexprprivatenoexcept |
Checks chunk_size_value and returns a value in [1, sendfile_max_chunk_size].
Definition at line 73 of file sendfile.hpp.
|
inlineconstexprnoexcept |
Get the valid value of a chunk size.
Definition at line 91 of file sendfile.hpp.
|
private |
Valid value of the chunk size.
Definition at line 95 of file sendfile.hpp.