aboutsummaryrefslogtreecommitdiff
path: root/src/control_connection.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2018-11-29 23:42:11 +0100
committerFelix Morgner <felix.morgner@gmail.com>2018-11-29 23:42:11 +0100
commitc307f09ca63f5dd609be0b3f1c077cd3bc1a9266 (patch)
tree42b72eebcc7cc0c48a81b4c37c824d9887c5443d /src/control_connection.hpp
parentac34053c57180b042426d82310d9ff57770387c9 (diff)
downloadwanda-c307f09ca63f5dd609be0b3f1c077cd3bc1a9266.tar.xz
wanda-c307f09ca63f5dd609be0b3f1c077cd3bc1a9266.zip
core: implement message sending
Diffstat (limited to 'src/control_connection.hpp')
-rw-r--r--src/control_connection.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/control_connection.hpp b/src/control_connection.hpp
index e868f99..50eee82 100644
--- a/src/control_connection.hpp
+++ b/src/control_connection.hpp
@@ -5,7 +5,9 @@
#include <boost/asio.hpp>
+#include <istream>
#include <memory>
+#include <ostream>
#include <set>
#include <string>
@@ -56,6 +58,8 @@ struct control_connection : keyed<control_connection>, std::enable_shared_from_t
*/
void close();
+ void send(std::string message);
+
private:
friend pointer make_control_connection(protocol::socket &&socket);
@@ -65,6 +69,7 @@ struct control_connection : keyed<control_connection>, std::enable_shared_from_t
boost::asio::streambuf m_in{};
boost::asio::streambuf m_out{};
std::istream m_input{&m_in};
+ std::ostream m_output{&m_out};
std::set<std::shared_ptr<listener>> m_listeners{};
bool m_running{};
};