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

Side by Side Diff: remoting/protocol/connection_tester.h

Issue 2757723002: Update ICE protocol to handle closed channel (Closed)
Patch Set: . Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/protocol/connection_tester.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_CONNECTION_TESTER_H_ 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TESTER_H_
6 #define REMOTING_PROTOCOL_CONNECTION_TESTER_H_ 6 #define REMOTING_PROTOCOL_CONNECTION_TESTER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 int write_errors_; 105 int write_errors_;
106 int read_errors_; 106 int read_errors_;
107 int packets_sent_; 107 int packets_sent_;
108 int packets_received_; 108 int packets_received_;
109 int bad_packets_received_; 109 int bad_packets_received_;
110 }; 110 };
111 111
112 class MessagePipeConnectionTester : public MessagePipe::EventHandler { 112 class MessagePipeConnectionTester : public MessagePipe::EventHandler {
113 public: 113 public:
114 MessagePipeConnectionTester(MessagePipe* client_pipe, 114 MessagePipeConnectionTester(MessagePipe* host_pipe,
115 MessagePipe* host_pipe, 115 MessagePipe* client_pipe,
116 int message_size, 116 int message_size,
117 int message_count); 117 int message_count);
118 ~MessagePipeConnectionTester() override; 118 ~MessagePipeConnectionTester() override;
119 119
120 void RunAndCheckResults(); 120 void RunAndCheckResults();
121 121
122 protected: 122 protected:
123 // MessagePipe::EventHandler interface. 123 // MessagePipe::EventHandler interface.
124 void OnMessagePipeOpen() override; 124 void OnMessagePipeOpen() override;
125 void OnMessageReceived(std::unique_ptr<CompoundBuffer> message) override; 125 void OnMessageReceived(std::unique_ptr<CompoundBuffer> message) override;
126 void OnMessagePipeClosed() override; 126 void OnMessagePipeClosed() override;
127 127
128 private: 128 private:
129 class MessageSender;
130
129 base::RunLoop run_loop_; 131 base::RunLoop run_loop_;
130 MessagePipe* host_pipe_;
131 MessagePipe* client_pipe_; 132 MessagePipe* client_pipe_;
132 int message_size_;
133 int message_count_;
134 133
135 std::vector<std::unique_ptr<VideoPacket>> sent_messages_; 134 std::unique_ptr<MessageSender> sender_;
135
136 std::vector<std::unique_ptr<VideoPacket>> received_messages_; 136 std::vector<std::unique_ptr<VideoPacket>> received_messages_;
137 }; 137 };
138 138
139 } // namespace protocol 139 } // namespace protocol
140 } // namespace remoting 140 } // namespace remoting
141 141
142 #endif // REMOTING_PROTOCOL_CONNECTION_TESTER_H_ 142 #endif // REMOTING_PROTOCOL_CONNECTION_TESTER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/connection_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698