22 template <
typename Socket >
116 return [
this, ctx =
this->shared_from_this() ]
118 (
const asio_ns::error_code & ec, std::size_t written )
noexcept 122 this->m_remained_size -= written;
123 this->m_transfered_size += written;
124 if( 0 ==
this->m_remained_size )
126 this->m_after_sendfile_cb( ec,
this->m_transfered_size );
130 this->init_next_write();
135 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
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, std::optional< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in std::optional<Value_Type> if parameter exis...
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
std::unique_ptr< char[] > m_buffer
sendfile_operation_runner_t & operator=(const sendfile_operation_runner_t &)=delete