Chromium Code Reviews| Index: blimp/engine/net/engine_connection_manager.h |
| diff --git a/blimp/engine/net/engine_connection_manager.h b/blimp/engine/net/engine_connection_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..86d41e1feb6ff412b16897fcf6b490c33da0d934 |
| --- /dev/null |
| +++ b/blimp/engine/net/engine_connection_manager.h |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BLIMP_ENGINE_NET_ENGINE_CONNECTION_MANAGER_H_ |
| +#define BLIMP_ENGINE_NET_ENGINE_CONNECTION_MANAGER_H_ |
| + |
| +#include "blimp/net/blimp_connection.h" |
| +#include "blimp/net/connection_handler.h" |
| + |
| +namespace blimp { |
| + |
| +// Coordinates the channel creation and authentication workflows for |
| +// incoming (Engine) network connections. |
|
Wez
2015/11/12 00:12:53
Does/will this class implement e.g. rate limiting
Kevin M
2015/11/12 01:53:15
Yes. Added TODO
|
| +class EngineConnectionManager : public ConnectionHandler, |
| + public BlimpConnection::DisconnectObserver { |
| + public: |
| + explicit EngineConnectionManager(ConnectionHandler* browser_session); |
|
Wez
2015/11/12 00:12:53
nit: See comment on client connection manager re n
|
| + |
| + // Accepts new BlimpConnections from |transport_| as fast as they arrive. |
| + void StartListening(); |
| + |
| + // ConnectionHandler implementation. |
| + // Handles a new connection from a Transport and passes it to a new |
| + // EngineAuthHandler. |
|
Wez
2015/11/12 00:12:53
nit: See client equivalent re comment style/conten
|
| + void HandleConnection(scoped_ptr<BlimpConnection> connection) override; |
| + |
| + // BlimpConnection::DisconnectObserver implementation. |
| + void OnDisconnected() override; |
|
Wez
2015/11/12 00:12:53
nit: Add a comment to clarify why this is needed?
Kevin M
2015/11/12 01:53:15
Actually, it's not needed here - there'll be hangi
|
| +}; |
|
Wez
2015/11/12 00:12:53
DISALLOW_COPY_AND_ASSIGN
Kevin M
2015/11/12 01:53:15
Done.
|
| + |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_ENGINE_NET_ENGINE_CONNECTION_MANAGER_H_ |