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

Unified Diff: webrtc/base/networkmonitor.h

Issue 2646863005: Fixing logic for using android_setsocknetwork() with bind(). (Closed)
Patch Set: Fixing tests for loopback IP change. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/base/physicalsocketserver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/networkmonitor.h
diff --git a/webrtc/base/networkmonitor.h b/webrtc/base/networkmonitor.h
index 5459cd63e9586105ff6dea70e6228379c9fa78ef..72b07b449c3028ff7bab7b353bfe3dd152abe9d8 100644
--- a/webrtc/base/networkmonitor.h
+++ b/webrtc/base/networkmonitor.h
@@ -19,13 +19,12 @@ namespace rtc {
class IPAddress;
-// Error values are negative.
-enum NetworkBindingResults {
- NETWORK_BIND_SUCCESS = 0, // No error
- NETWORK_BIND_FAILURE = -1, // Generic error
- NETWORK_BIND_NOT_IMPLEMENTED = -2,
- NETWORK_BIND_ADDRESS_NOT_FOUND = -3,
- NETWORK_BIND_NETWORK_CHANGED = -4
+enum class NetworkBindingResult {
+ SUCCESS = 0, // No error
+ FAILURE = -1, // Generic error
+ NOT_IMPLEMENTED = -2,
+ ADDRESS_NOT_FOUND = -3,
+ NETWORK_CHANGED = -4
};
enum AdapterType {
@@ -44,7 +43,9 @@ class NetworkBinderInterface {
// packets on the socket |socket_fd| will be sent via that network.
// This is needed because some operating systems (like Android) require a
// special bind call to put packets on a non-default network interface.
- virtual int BindSocketToNetwork(int socket_fd, const IPAddress& address) = 0;
+ virtual NetworkBindingResult BindSocketToNetwork(
+ int socket_fd,
+ const IPAddress& address) = 0;
virtual ~NetworkBinderInterface() {}
};
« no previous file with comments | « no previous file | webrtc/base/physicalsocketserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698