Commit 3c7604d4 authored by Michal Vaner's avatar Michal Vaner
Browse files

Add UDPQuery::stop()

It will be used internally when some terminating condition happens. But
it might be useful from outside as well possibly.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/vorner-recursor-timeouts@3397 e5f2f494-b856-4b98-b285-d166d9295462
parent bf38ef9c
......@@ -189,7 +189,8 @@ public:
*/
enum Result {
SUCCESS,
TIME_OUT
TIME_OUT,
STOPPED
};
/// Abstract callback for the UDPQuery.
class Callback {
......@@ -204,6 +205,8 @@ public:
boost::shared_ptr<Callback> callback, int timeout = -1);
void operator()(asio::error_code ec = asio::error_code(),
size_t length = 0);
/// Terminate the query.
void stop(Result reason = STOPPED);
private:
enum { MAX_LENGTH = 4096 };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment