22template <
typename Socket >
35 using base_type_t::base_type_t;
69 const auto desired_size =
77 this->m_file_descriptor );
79 if( desired_size != n )
92 asio_ns::const_buffer{
94 static_cast< std::size_t
>( desired_size ) },
95 asio_ns::bind_executor(
116 return [
this, ctx = this->shared_from_this() ]
118 (
const asio_ns::error_code & ec, std::size_t written )
noexcept
after_sendfile_cb_t m_after_sendfile_cb
sendfile_operation_runner_base_t()=delete
const file_size_t m_chunk_size
file_size_t m_remained_size
file_offset_t m_next_write_offset
file_descriptor_t m_file_descriptor
default_asio_executor m_executor
file_size_t m_transfered_size
std::unique_ptr< char[] > m_buffer
auto make_async_write_handler() noexcept
Helper method for making a lambda for async_write completion handler.
virtual void start() override
sendfile_operation_runner_t(const sendfile_operation_runner_t &)=delete
sendfile_operation_runner_base_t< Socket > base_type_t
sendfile_operation_runner_t & operator=(const sendfile_operation_runner_t &)=delete
void init_next_write() noexcept
sendfile_operation_runner_t(sendfile_operation_runner_t &&)=delete
auto make_error_code(const Error_Type &e) noexcept
@ async_write_call_failed
A call to async_write failed. The corresponding write operation wasn't done.
asio_ns::error_code make_asio_compaible_error(asio_convertible_error_t err) noexcept
Make restinio error_code compatible with asio_ns::error_code.