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
@@ -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 };