![]() |
Kea
1.9.9-git
|
Public Member Functions | |
| IOFetchData (IOFetch::Protocol proto, IOService &service, const IOAddress &address, uint16_t port, OutputBufferPtr &buff, IOFetch::Callback *cb, int wait) | |
| Constructor. More... | |
| bool | responseOK () |
Public Attributes | |
| IOFetch::Callback * | callback |
| Called on I/O Completion. More... | |
| size_t | cumulative |
| Cumulative received amount. More... | |
| size_t | expected |
| Expected amount of data. More... | |
| OutputBufferPtr | msgbuf |
| Wire buffer for question. More... | |
| size_t | offset |
| Offset to receive data. More... | |
| isc::log::MessageID | origin |
| Origin of last asynchronous I/O. More... | |
| bool | packet |
| true if packet was supplied More... | |
| IOFetch::Protocol | protocol |
| Protocol being used. More... | |
| isc::dns::qid_t | qid |
| The QID set in the query. More... | |
| OutputBufferPtr | received |
| Received data put here. More... | |
| boost::scoped_ptr< IOEndpoint > | remote_rcv |
| Where the response came from. More... | |
| boost::scoped_ptr< IOEndpoint > | remote_snd |
| Where the fetch is sent. More... | |
| boost::scoped_ptr< IOAsioSocket< IOFetch > > | socket |
| Socket to use for I/O. More... | |
| uint8_t | staging [IOFetch::STAGING_LENGTH] |
| Temporary array for received data. More... | |
| bool | stopped |
| Have we stopped running? More... | |
| int | timeout |
| Timeout in ms. More... | |
| boost::asio::deadline_timer | timer |
| Timer to measure timeouts. More... | |
IOFetch Data.
The data for IOFetch is held in a separate struct pointed to by a shared_ptr object. This is because the IOFetch object will be copied often (it is used as a coroutine and passed as callback to many async_*() functions) and we want keep the same data). Organising the data in this way keeps copying to a minimum.
Definition at line 58 of file io_fetch.cc.
|
inline |
Constructor.
Just fills in the data members of the IOFetchData structure
| proto | Either IOFetch::TCP or IOFetch::UDP. |
| service | I/O Service object to handle the asynchronous operations. |
| address | IP address of upstream server |
| port | Port to use for the query |
| buff | Output buffer into which the response (in wire format) is written (if a response is received). |
| cb | Callback object containing the callback to be called when we terminate. The caller is responsible for managing this object and deleting it if necessary. |
| wait | Timeout for the fetch (in ms). |
TODO: May need to alter constructor (see comment 4 in Trac ticket #554)
Definition at line 107 of file io_fetch.cc.
|
inline |
Definition at line 148 of file io_fetch.cc.
References isc::util::readUint16().
Here is the call graph for this function:| IOFetch::Callback* isc::asiodns::IOFetchData::callback |
Called on I/O Completion.
Definition at line 70 of file io_fetch.cc.
| size_t isc::asiodns::IOFetchData::cumulative |
Cumulative received amount.
Definition at line 73 of file io_fetch.cc.
| size_t isc::asiodns::IOFetchData::expected |
Expected amount of data.
Definition at line 74 of file io_fetch.cc.
| OutputBufferPtr isc::asiodns::IOFetchData::msgbuf |
Wire buffer for question.
Definition at line 68 of file io_fetch.cc.
| size_t isc::asiodns::IOFetchData::offset |
Offset to receive data.
Definition at line 75 of file io_fetch.cc.
| isc::log::MessageID isc::asiodns::IOFetchData::origin |
Origin of last asynchronous I/O.
Definition at line 85 of file io_fetch.cc.
| bool isc::asiodns::IOFetchData::packet |
true if packet was supplied
Definition at line 78 of file io_fetch.cc.
| IOFetch::Protocol isc::asiodns::IOFetchData::protocol |
Protocol being used.
Definition at line 72 of file io_fetch.cc.
| isc::dns::qid_t isc::asiodns::IOFetchData::qid |
The QID set in the query.
Definition at line 88 of file io_fetch.cc.
| OutputBufferPtr isc::asiodns::IOFetchData::received |
Received data put here.
Definition at line 69 of file io_fetch.cc.
| boost::scoped_ptr<IOEndpoint> isc::asiodns::IOFetchData::remote_rcv |
Where the response came from.
Definition at line 67 of file io_fetch.cc.
| boost::scoped_ptr<IOEndpoint> isc::asiodns::IOFetchData::remote_snd |
Where the fetch is sent.
Definition at line 66 of file io_fetch.cc.
| boost::scoped_ptr<IOAsioSocket<IOFetch> > isc::asiodns::IOFetchData::socket |
Socket to use for I/O.
Definition at line 64 of file io_fetch.cc.
| uint8_t isc::asiodns::IOFetchData::staging[IOFetch::STAGING_LENGTH] |
Temporary array for received data.
Definition at line 86 of file io_fetch.cc.
| bool isc::asiodns::IOFetchData::stopped |
Have we stopped running?
Definition at line 76 of file io_fetch.cc.
| int isc::asiodns::IOFetchData::timeout |
Timeout in ms.
Definition at line 77 of file io_fetch.cc.
| boost::asio::deadline_timer isc::asiodns::IOFetchData::timer |
Timer to measure timeouts.
Definition at line 71 of file io_fetch.cc.