RESTinio

Public Member Functions | Private Attributes | Friends | List of all members
restinio::file_descriptor_holder_t Class Reference

Wrapper class for working with native file handler. More...

`#include <sendfile.hpp>`

## Public Member Functions
| file_descriptor_holder_t (file_descriptor_t fd) noexcept
| Init constructor. More...
| file_descriptor_holder_t (file_descriptor_holder_t &&fdh) noexcept
file_descriptor_holder_t & | operator= (file_descriptor_holder_t &&fdh) noexcept
| ~file_descriptor_holder_t () noexcept
bool | is_valid () const noexcept
| Check if file descriptor is valid. More...
file_descriptor_t | fd () const noexcept
void | release () noexcept
Copy semantics.
Not allowed.
| file_descriptor_holder_t (const file_descriptor_holder_t &)=delete
file_descriptor_holder_t & | operator= (const file_descriptor_holder_t &)=delete

## Private Attributes
file_descriptor_t | m_file_descriptor
| Target file descriptor. More...

## Friends
void | swap (file_descriptor_holder_t &left, file_descriptor_holder_t &right) noexcept
| Swap two descriptors. More...

## Detailed Description

Wrapper class for working with native file handler.

Definition at line 108 of file sendfile.hpp.

## Constructor & Destructor Documentation

## ◆ file_descriptor_holder_t() [1/3]

restinio::file_descriptor_holder_t::file_descriptor_holder_t | ( | file_descriptor_t | fd | ) |
| inline noexcept

Init constructor.

Definition at line 120 of file sendfile.hpp.

## ◆ file_descriptor_holder_t() [2/3]

restinio::file_descriptor_holder_t::file_descriptor_holder_t | ( | const file_descriptor_holder_t & |  | ) |
| delete

## ◆ file_descriptor_holder_t() [3/3]

restinio::file_descriptor_holder_t::file_descriptor_holder_t | ( | file_descriptor_holder_t && | fdh | ) |
| inline noexcept

Definition at line 132 of file sendfile.hpp.

## ◆ ~file_descriptor_holder_t()

restinio::file_descriptor_holder_t::~file_descriptor_holder_t | ( |  | ) |
| inline noexcept

Definition at line 148 of file sendfile.hpp.

## Member Function Documentation

## ◆ fd()

file_descriptor_t restinio::file_descriptor_holder_t::fd | ( |  | ) | const
| inline noexcept

Definition at line 161 of file sendfile.hpp.

## ◆ is_valid()

bool restinio::file_descriptor_holder_t::is_valid | ( |  | ) | const
| inline noexcept

Check if file descriptor is valid.

Definition at line 155 of file sendfile.hpp.

## ◆ operator=() [1/2]

file_descriptor_holder_t & restinio::file_descriptor_holder_t::operator= | ( | const file_descriptor_holder_t & |  | ) |
| delete

## ◆ operator=() [2/2]

file_descriptor_holder_t & restinio::file_descriptor_holder_t::operator= | ( | file_descriptor_holder_t && | fdh | ) |
| inline noexcept

Definition at line 138 of file sendfile.hpp.

## ◆ release()

void restinio::file_descriptor_holder_t::release | ( |  | ) |
| inline noexcept

Definition at line 167 of file sendfile.hpp.

## Friends And Related Function Documentation

## ◆ swap

void swap | ( | file_descriptor_holder_t & | left,
|  | file_descriptor_holder_t & | right
| ) |  |
| friend

Swap two descriptors.

Definition at line 113 of file sendfile.hpp.

## Member Data Documentation

## ◆ m_file_descriptor

file_descriptor_t restinio::file_descriptor_holder_t::m_file_descriptor
| private

Target file descriptor.

Definition at line 174 of file sendfile.hpp.

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

- restinio/sendfile.hpp