From: Michal 'vorner' Vaner Date: Wed, 16 May 2012 13:23:02 +0000 (+0200) Subject: [1914] Interface for the async receives X-Git-Tag: trac2351_base~226^2~89^2~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=480d50eef89a78c5ed326fa392254aeb2ec6df06;p=thirdparty%2Fkea.git [1914] Interface for the async receives It needs to be tested, documented and of course implemented. --- diff --git a/src/lib/config/ccsession.h b/src/lib/config/ccsession.h index 059968c71a..4b089e99e4 100644 --- a/src/lib/config/ccsession.h +++ b/src/lib/config/ccsession.h @@ -15,13 +15,16 @@ #ifndef __CCSESSION_H #define __CCSESSION_H 1 -#include - #include #include + #include #include +#include +#include +#include + namespace isc { namespace config { @@ -358,6 +361,20 @@ public: return (session_.group_recvmsg(envelope, msg, nonblock, seq)); }; + class AsyncRecvRequest; + typedef std::list > AsyncRecvRequests; + typedef AsyncRecvRequests::const_iterator AsyncRecvRequestID; + typedef boost::function3 + AsyncRecvCallback; + AsyncRecvRequestID groupRecvMsgAsync(const AsyncRecvCallback& callback, + bool is_reply = true, int seq = -1, + const std::string& recipient = + std::string()); + + void cancelAsyncRecv(const AsyncRecvRequestID& id); + private: ModuleSpec readModuleSpecification(const std::string& filename); void startCheck(); @@ -367,6 +384,7 @@ private: std::string module_name_; isc::cc::AbstractSession& session_; ModuleSpec module_specification_; + AsyncRecvRequests async_recv_requests_; isc::data::ConstElementPtr handleConfigUpdate( isc::data::ConstElementPtr new_config);