diff --git a/src/common/communication/common.h b/src/common/communication/common.h index 578f5b39..bcdbed84 100644 --- a/src/common/communication/common.h +++ b/src/common/communication/common.h @@ -542,8 +542,6 @@ class AdHocSocketHandler { * same thing as `primary_callback`, but secondary sockets may need some * different handling. * - * TODO: Add an overload with a single callback - * * @tparam F A function type in the form of * `void(boost::asio::local::stream_protocol::socket&)`. * @tparam G The same as `F`. @@ -619,6 +617,18 @@ class AdHocSocketHandler { acceptor.reset(); } + /** + * The same as the above, but with a single callback for incoming + * connections on the primary socket and on secondary sockets. + * + * @overload + */ + template + void receive_multi(std::optional> logging, + F callback) { + receive_multi(logging, callback, callback); + } + private: /** * Used in `receive_multi()` to asynchronously listen for secondary socket