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

Side by Side Diff: blimp/net/engine_connection_manager.h

Issue 1429193002: Add interfaces for most major Blimp net components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address wez's feedback. Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BLIMP_NET_ENGINE_CONNECTION_MANAGER_H_
6 #define BLIMP_NET_ENGINE_CONNECTION_MANAGER_H_
7
8 #include "base/macros.h"
9 #include "blimp/net/blimp_connection.h"
10 #include "blimp/net/connection_handler.h"
11
12 namespace blimp {
13
14 // Coordinates the channel creation and authentication workflows for
15 // incoming (Engine) network connections.
16 //
17 // TODO(kmarshall): Add rate limiting and abuse handling logic.
18 class EngineConnectionManager : public ConnectionHandler,
19 public BlimpConnection::DisconnectObserver {
20 public:
21 // Caller is responsible for ensuring that |connection_handler| outlives
22 // |this|.
23 explicit EngineConnectionManager(ConnectionHandler* connection_handler);
24
25 ~EngineConnectionManager() override;
26
27 // Accepts new BlimpConnections from |transport_| as fast as they arrive.
28 void StartListening();
29
30 // ConnectionHandler implementation.
31 // Handles a new connection, authenticates it, and passes it on to the
32 // underlying ConnectionHandler.
33 void HandleConnection(scoped_ptr<BlimpConnection> connection) override;
34
35 private:
36 DISALLOW_COPY_AND_ASSIGN(EngineConnectionManager);
37 };
38
39 } // namespace blimp
40
41 #endif // BLIMP_NET_ENGINE_CONNECTION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698