RESTinio
Loading...
Searching...
No Matches
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.
 file_descriptor_holder_t (file_descriptor_holder_t &&fdh) noexcept
file_descriptor_holder_toperator= (file_descriptor_holder_t &&fdh) noexcept
 ~file_descriptor_holder_t () noexcept
bool is_valid () const noexcept
 Check if file descriptor is valid.
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_toperator= (const file_descriptor_holder_t &)=delete

Private Attributes

file_descriptor_t m_file_descriptor
 Target file descriptor.

Friends

void swap (file_descriptor_holder_t &left, file_descriptor_holder_t &right) noexcept
 Swap two descriptors.

Detailed Description

Wrapper class for working with native file handler.

Definition at line 112 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)
inlinenoexcept

Init constructor.

Definition at line 124 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)
inlinenoexcept

Definition at line 136 of file sendfile.hpp.

◆ ~file_descriptor_holder_t()

restinio::file_descriptor_holder_t::~file_descriptor_holder_t ( )
inlinenoexcept

Definition at line 150 of file sendfile.hpp.

Member Function Documentation

◆ fd()

file_descriptor_t restinio::file_descriptor_holder_t::fd ( ) const
inlinenodiscardnoexcept

Definition at line 165 of file sendfile.hpp.

◆ is_valid()

bool restinio::file_descriptor_holder_t::is_valid ( ) const
inlinenodiscardnoexcept

Check if file descriptor is valid.

Definition at line 158 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)
inlinenoexcept

Definition at line 142 of file sendfile.hpp.

◆ release()

void restinio::file_descriptor_holder_t::release ( )
inlinenoexcept

Definition at line 171 of file sendfile.hpp.

◆ swap

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

Swap two descriptors.

Definition at line 117 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 178 of file sendfile.hpp.


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