| OLD | NEW |
| (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 a | |
| 26 // |StreamSocketConnection|. | |
| 27 class BLIMP_NET_EXPORT TCPConnection : public BlimpConnection { | |
| 28 public: | |
| 29 ~TCPConnection() override; | |
| 30 explicit TCPConnection(std::unique_ptr<MessagePort> message_port); | |
| 31 | |
| 32 // BlimpConnection overrides. | |
| 33 void SetIncomingMessageProcessor(BlimpMessageProcessor* processor) override; | |
| 34 BlimpMessageProcessor* GetOutgoingMessageProcessor() override; | |
| 35 | |
| 36 private: | |
| 37 std::unique_ptr<MessagePort> message_port_; | |
| 38 std::unique_ptr<BlimpMessagePump> message_pump_; | |
| 39 std::unique_ptr<BlimpMessageSender> outgoing_msg_processor_; | |
| 40 }; | |
| 41 | |
| 42 } // namespace blimp | |
| 43 | |
| 44 #endif // BLIMP_NET_TCP_CONNECTION_H_ | |
| OLD | NEW |