Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Unified Diff: remoting/protocol/session.h

Issue 10823323: Add support for multiplexed channels in remoting::protocol::Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/session.h
diff --git a/remoting/protocol/session.h b/remoting/protocol/session.h
index 7041486be037313ab8a98875647bdfd9d009b30d..118ca0b9440f860c6135dfafcfd9ab06c2ec95a4 100644
--- a/remoting/protocol/session.h
+++ b/remoting/protocol/session.h
@@ -7,7 +7,6 @@
#include <string>
-#include "remoting/protocol/channel_factory.h"
#include "remoting/protocol/errors.h"
#include "remoting/protocol/session_config.h"
@@ -18,12 +17,13 @@ class IPEndPoint;
namespace remoting {
namespace protocol {
+class ChannelFactory;
struct TransportRoute;
// Generic interface for Chromotocol connection used by both client and host.
// Provides access to the connection channels, but doesn't depend on the
// protocol used for each channel.
-class Session : public ChannelFactory {
+class Session {
public:
enum State {
// Created, but not connecting yet.
@@ -98,6 +98,12 @@ class Session : public ChannelFactory {
// ChromotocolServer::IncomingConnectionCallback.
virtual void set_config(const SessionConfig& config) = 0;
+ // Return channel factories for the session. First one creates regular
+ // channels, while the second one creates multiplexed channels. All
+ // multiplexed channels work over a single regular channel.
Wez 2012/08/15 00:52:23 The Session knows the configuration that is in-use
Sergey Ulanov 2012/08/15 01:35:42 I don't think that would be the right approach. (
Wez 2012/08/16 00:45:00 Fair points. :(
+ virtual ChannelFactory* GetMainChannelFactory() = 0;
Wez 2012/08/15 00:52:23 nit: GetSeparateChannelFactory()/GetIndependentCha
Sergey Ulanov 2012/08/15 01:35:42 What do you think about GetBaseChannelFactory?
Wez 2012/08/16 00:45:00 "Base" doesn't really convey "not-multiplexed", th
Sergey Ulanov 2012/08/16 00:59:49 Ok, changed it to GetTransportChannelFactory()
+ virtual ChannelFactory* GetMultiplexedChannelFactory() = 0;
+
// Closes connection. Callbacks are guaranteed not to be called
// after this method returns. Must be called before the object is
// destroyed, unless the state is set to FAILED or CLOSED.
« remoting/protocol/channel_multiplexer.cc ('K') | « remoting/protocol/protocol_mock_objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698