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

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

Issue 2439403003: Refactor BlimpConnection to TCPConnection (Closed)
Patch Set: CR Round 2 + formatting Created 4 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_TCP_CONNECTION_H_
6 #define BLIMP_NET_TCP_CONNECTION_H_
7
8 #include <memory>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "blimp/net/blimp_connection.h"
13 #include "blimp/net/blimp_net_export.h"
14 #include "blimp/net/blimp_transport.h"
15 #include "net/base/ip_endpoint.h"
16 #include "net/base/net_errors.h"
17
18 namespace blimp {
19
20 class BlimpMessageProcessor;
21 class BlimpMessagePump;
22 class BlimpMessageSender;
23 class MessagePort;
24
25 // A |BlimpConnection| implementation that passes |BlimpMessage|s using TCP.
Kevin M 2016/10/27 18:08:03 This is used for SSL too. Maybe StreamSocketConnec
perumaal 2016/10/27 18:47:38 Done.
26 class BLIMP_NET_EXPORT TCPConnection : public BlimpConnection {
27 public:
28 ~TCPConnection() override;
29 explicit TCPConnection(std::unique_ptr<MessagePort> message_port);
30
31 // BlimpConnection overrides.
32 void SetIncomingMessageProcessor(BlimpMessageProcessor* processor) override;
33 BlimpMessageProcessor* GetOutgoingMessageProcessor() override;
34
35 private:
36 std::unique_ptr<MessagePort> message_port_;
37 std::unique_ptr<BlimpMessagePump> message_pump_;
38 std::unique_ptr<BlimpMessageSender> outgoing_msg_processor_;
39 };
40
41 } // namespace blimp
42
43 #endif // BLIMP_NET_TCP_CONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698