From: Jeremy C. Reed Date: Thu, 30 Jan 2014 06:17:28 +0000 (+0530) Subject: [1366] Update doc of dummy_io_cb.h X-Git-Tag: bind10-1.2.0beta1-release~79^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dcd06d51208c8b3cdb30ca89ae752244bd766c60;p=thirdparty%2Fkea.git [1366] Update doc of dummy_io_cb.h --- diff --git a/src/lib/asiolink/dummy_io_cb.h b/src/lib/asiolink/dummy_io_cb.h index c4644c5048..79d087d221 100644 --- a/src/lib/asiolink/dummy_io_cb.h +++ b/src/lib/asiolink/dummy_io_cb.h @@ -15,6 +15,7 @@ #ifndef DUMMY_IO_CB_H #define DUMMY_IO_CB_H +#include #include #include @@ -39,20 +40,30 @@ public: /// \brief Asynchronous I/O callback method /// - /// TODO: explain why this method should never be called. - /// This should be unused. + /// Should never be called, as this class is a convenience class provided + /// for instances where a socket is required but it is known that no + /// asynchronous operations will be carried out. void operator()(asio::error_code) { - // TODO: log an error if this method ever gets called. + // If the function is called, there is a serious logic error in the + // program (this class should not be used as the callback class). As + // the asiolink module is too low-level for logging errors, use assert() + // to bug-check the program. + assert(false); } /// \brief Asynchronous I/O callback method /// - /// TODO: explain why this method should never be called. - /// This should be unused. + /// Should never be called, as this class is a convenience class provided + /// for instances where a socket is required but it is known that no + /// asynchronous operations will be carried out. void operator()(asio::error_code, size_t) { - // TODO: log an error if this method ever gets called. + // If the function is called, there is a serious logic error in the + // program (this class should not be used as the callback class). As + // the asiolink module is too low-level for logging errors, use assert() + // to bug-check the program. + assert(false); } };