22 template <
typename Socket >
114 return [
this, ctx =
this->shared_from_this() ]
116 (
const asio_ns::error_code & ec, std::size_t written )
noexcept 120 this->m_remained_size -= written;
121 this->m_transfered_size += written;
122 if( 0 ==
this->m_remained_size )
124 this->m_after_sendfile_cb( ec,
this->m_transfered_size );
128 this->init_next_write();
133 this->m_after_sendfile_cb( ec,
this->m_transfered_size );
sendfile_operation_runner_t(const sendfile_operation_runner_t &)=delete
void init_next_write() noexcept
A runner of sendfile operation.
sendfile_operation_runner_t(sendfile_operation_runner_t &&)=delete
auto make_async_write_handler() noexcept
Helper method for making a lambda for async_write completion handler.
sendfile_operation_runner_t & operator=(sendfile_operation_runner_t &&)=delete
virtual void start() override
RESTINIO_NODISCARD char to_lower_case(unsigned char ch)
std::unique_ptr< char[] > m_buffer
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...
sendfile_operation_runner_t & operator=(const sendfile_operation_runner_t &)=delete