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

Unified Diff: remoting/jingle_glue/socket_util.h

Issue 339503006: Update error-handling logic in ChromiumPacketSocketFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « remoting/jingle_glue/chromium_socket_factory_unittest.cc ('k') | remoting/jingle_glue/socket_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/socket_util.h
diff --git a/remoting/jingle_glue/socket_util.h b/remoting/jingle_glue/socket_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..ce087ae452ffc8d4d9cb22a1553e13c41aadcac6
--- /dev/null
+++ b/remoting/jingle_glue/socket_util.h
@@ -0,0 +1,23 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_JINGLE_GLUE_SOCKET_UTIL_H_
+#define REMOTING_JINGLE_GLUE_SOCKET_UTIL_H_
+
+namespace remoting {
+
+// Enum for different actions that can be taken after sendto() returns an error.
+enum SocketErrorAction {
+ SOCKET_ERROR_ACTION_FAIL,
+ SOCKET_ERROR_ACTION_IGNORE,
+ SOCKET_ERROR_ACTION_RETRY,
+};
+
+// Returns true if |error| must be ignored when returned from sendto(). |retry|
+// is set set when sentto() should be called for the same packet again.
+SocketErrorAction GetSocketErrorAction(int error);
+
+} // namespace remoting
+
+#endif // REMOTING_JINGLE_GLUE_SOCKET_UTIL_H_
« no previous file with comments | « remoting/jingle_glue/chromium_socket_factory_unittest.cc ('k') | remoting/jingle_glue/socket_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698