restinio::sendfile_chunk_size_guarded_value_t Class Reference

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...

## Detailed Description

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.

Since
  v.0.4.3

Definition at line 64 of file sendfile.hpp.

## Constructor & Destructor Documentation

## sendfile_chunk_size_guarded_value_t()

constexpr restinio::sendfile_chunk_size_guarded_value_t::sendfile_chunk_size_guarded_value_t | ( | file_size_t | chunk_size_value | ) |

inline constexpr noexcept

Definition at line 86 of file sendfile.hpp.

## Member Function Documentation

## clarify_chunk_size()

static constexpr file_size_t restinio::sendfile_chunk_size_guarded_value_t::clarify_chunk_size | ( | file_size_t | chunk_size_value | ) |

inline static constexpr private noexcept

Checks chunk_size_value and returns a value in [1, sendfile_max_chunk_size].

Definition at line 73 of file sendfile.hpp.

## value()

constexpr auto restinio::sendfile_chunk_size_guarded_value_t::value | ( |  | ) | const

inline constexpr noexcept

Get the valid value of a chunk size.

Definition at line 91 of file sendfile.hpp.

## Member Data Documentation

## m_chunk_size

const file_size_t restinio::sendfile_chunk_size_guarded_value_t::m_chunk_size

private

Valid value of the chunk size.

Definition at line 95 of file sendfile.hpp.

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

- restinio/sendfile.hpp