Urdl C++ Library

PrevUpHomeNext
read_stream::get_option

Gets the current value of an option that controls the behaviour of the stream.

template<
    typename Option>
Option get_option() const;

Return Value

The current value of the option.

Remarks

Options are uniquely identified by type.

Example

urdl::read_stream stream(io_service);
urdl::http::max_redirects option
  = stream.get_option<urdl::http::max_redirects>();
std::size_t value = option.value();

PrevUpHomeNext