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

Side by Side Diff: tools/android/forwarder2/command.h

Issue 2402793002: [Android] Add timeout to unmap reply handling. (Closed)
Patch Set: Created 4 years, 2 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 | tools/android/forwarder2/command.cc » ('j') | tools/android/forwarder2/socket.cc » ('J')
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 TOOLS_ANDROID_FORWARDER2_COMMAND_H_ 5 #ifndef TOOLS_ANDROID_FORWARDER2_COMMAND_H_
6 #define TOOLS_ANDROID_FORWARDER2_COMMAND_H_ 6 #define TOOLS_ANDROID_FORWARDER2_COMMAND_H_
7 7
8 8
9 namespace forwarder2 { 9 namespace forwarder2 {
10 10
(...skipping 18 matching lines...) Expand all
29 UNLISTEN_ERROR, 29 UNLISTEN_ERROR,
30 UNLISTEN_SUCCESS, 30 UNLISTEN_SUCCESS,
31 }; 31 };
32 32
33 } // namespace command 33 } // namespace command
34 34
35 bool ReadCommand(Socket* socket, 35 bool ReadCommand(Socket* socket,
36 int* port_out, 36 int* port_out,
37 command::Type* command_type_out); 37 command::Type* command_type_out);
38 38
39 bool ReadCommandWithTimeout(Socket* socket,
40 int* port_out,
41 command::Type* command_type_out,
42 int timeout_secs);
43
39 // Helper function to read the command from the |socket| and return true if the 44 // Helper function to read the command from the |socket| and return true if the
40 // |command| is equal to the given command parameter. 45 // |command| is equal to the given command parameter.
41 bool ReceivedCommand(command::Type command, Socket* socket); 46 bool ReceivedCommand(command::Type command, Socket* socket);
42 47
48 bool ReceivedCommandWithTimeout(command::Type command,
49 Socket* socket,
50 int timeout_secs);
51
43 bool SendCommand(command::Type command, int port, Socket* socket); 52 bool SendCommand(command::Type command, int port, Socket* socket);
44 53
45 } // namespace forwarder 54 } // namespace forwarder
46 55
47 #endif // TOOLS_ANDROID_FORWARDER2_COMMAND_H_ 56 #endif // TOOLS_ANDROID_FORWARDER2_COMMAND_H_
OLDNEW
« no previous file with comments | « no previous file | tools/android/forwarder2/command.cc » ('j') | tools/android/forwarder2/socket.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698