12#include <boost/shared_array.hpp>
13#include <boost/shared_ptr.hpp>
14#include <boost/date_time/posix_time/posix_time_types.hpp>
19#ifdef HAVE_BOOST_ASIO_COROUTINE_HPP
20#include <boost/asio/coroutine.hpp>
22#include <ext/coroutine/coroutine.hpp>
25#include <boost/system/error_code.hpp>
45class IOFetch :
public boost::asio::coroutine {
205 void operator()(boost::system::error_code ec = boost::system::error_code(),
size_t length = 0);
232 void logIOFailure(boost::system::error_code ec);
237 boost::shared_ptr<IOFetchData> data_;
Callback()
Default Constructor.
virtual ~Callback()
Virtual Destructor.
virtual void operator()(Result result)=0
Callback method.
Upstream Fetch Processing.
@ STAGING_LENGTH
Size of staging buffer.
void operator()(boost::system::error_code ec=boost::system::error_code(), size_t length=0)
Coroutine entry point.
Result
Result of Upstream Fetch.
@ NOTSET
For testing, indicates value not set.
@ STOPPED
Control code, fetch has been stopped.
@ TIME_OUT
Failure, fetch timed out.
@ SUCCESS
Success, fetch completed.
IOFetch(Protocol protocol, isc::asiolink::IOService &service, const isc::dns::Question &question, const isc::asiolink::IOAddress &address, uint16_t port, isc::util::OutputBufferPtr &buff, Callback *cb, int wait=-1, bool edns=true)
Constructor.
Origin
Origin of Asynchronous I/O Call.
@ NONE
No asynchronous call outstanding.
Protocol
Protocol to use on the fetch.
void stop(Result reason=STOPPED)
Terminate query.
Protocol getProtocol() const
Return Current Protocol.
The IOAddress class represents an IP addresses (version agnostic)
The IOService class is a wrapper for the ASIO io_service class.
The Question class encapsulates the common search key of DNS lookup, consisting of owner name,...
boost::shared_ptr< IOFetch > IOFetchPtr
Defines a pointer to an IOFetch.
boost::shared_ptr< const Message > ConstMessagePtr
boost::shared_ptr< Message > MessagePtr
Pointer-like type pointing to a Message.
boost::shared_ptr< OutputBuffer > OutputBufferPtr
Defines the logger used by the top-level component of kea-lfc.