From 8b3d5b2da08dc867a33d7bc83e8d17a7289b6028 Mon Sep 17 00:00:00 2001 From: Asias He Date: Wed, 24 Jun 2015 11:40:49 +0800 Subject: [PATCH] streaming: Reduce dependency to stream_session in connection_handler --- streaming/connection_handler.hh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/streaming/connection_handler.hh b/streaming/connection_handler.hh index 24c64e671b..4be5eddd45 100644 --- a/streaming/connection_handler.hh +++ b/streaming/connection_handler.hh @@ -23,12 +23,13 @@ #include "utils/UUID.hh" #include "gms/inet_address.hh" -#include "streaming/stream_session.hh" #include "streaming/session_info.hh" #include "streaming/progress_info.hh" namespace streaming { +class stream_session; + /** * ConnectionHandler manages incoming/outgoing message exchange for the {@link StreamSession}. * @@ -39,10 +40,10 @@ namespace streaming { */ class connection_handler { public: - connection_handler(stream_session session) - : _session(std::move(session)) - , _incoming(_session) - , _outgoing(_session) { + connection_handler(stream_session& session) + : _session(session) + , _incoming(session) + , _outgoing(session) { } #if 0 @@ -336,7 +337,7 @@ public: }; private: - stream_session _session; + stream_session& _session; incoming_message_handler _incoming; outgoing_message_handler _outgoing; };