From fe5614387e5e491a0dcba29d47ede79b83e8dae3 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 16 Aug 2017 13:27:22 -0600 Subject: [PATCH] ircd::listen: Add string options overload. --- include/ircd/listen.h | 1 + ircd/listen.cc | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/ircd/listen.h b/include/ircd/listen.h index f47336568..717cbf0ed 100644 --- a/include/ircd/listen.h +++ b/include/ircd/listen.h @@ -32,6 +32,7 @@ struct listener public: listener(const json::object &options); + listener(const std::string &options); ~listener() noexcept; }; diff --git a/ircd/listen.cc b/ircd/listen.cc index 4e269825a..ffa48abea 100644 --- a/ircd/listen.cc +++ b/ircd/listen.cc @@ -65,6 +65,11 @@ struct listener::acceptor // ircd::listener // +ircd::listener::listener(const std::string &opts) +:listener{json::object{opts}} +{ +} + ircd::listener::listener(const json::object &opts) :acceptor{std::make_unique(opts)} {