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

Unified Diff: remoting/signaling/xmpp_signal_strategy.cc

Issue 608613002: Increase buffer size for XMPP sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/signaling/xmpp_signal_strategy.cc
diff --git a/remoting/signaling/xmpp_signal_strategy.cc b/remoting/signaling/xmpp_signal_strategy.cc
index 46f92943683df21a63bf1f0ff4a848d05504d26b..9b32a6362de82e6b6948da87abd3c086ff9de493 100644
--- a/remoting/signaling/xmpp_signal_strategy.cc
+++ b/remoting/signaling/xmpp_signal_strategy.cc
@@ -27,10 +27,16 @@ const char kDefaultResourceName[] = "chromoting";
// connections that are idle for more than a minute.
const int kKeepAliveIntervalSeconds = 50;
-// Read buffer size used by ChromeAsyncSocket for read and write buffers. Most
-// of XMPP messages are smaller than 4kB.
-const size_t kReadBufferSize = 4096;
-const size_t kWriteBufferSize = 4096;
+// Read buffer size used by ChromeAsyncSocket for read and write buffers.
+//
+// TODO(sergeyu): Currently jingle::ChromeAsyncSocket fails Write() when the
+// write buffer is full and talk::XmppClient just ignores the error. As result
+// chunks of data sent to the server are dropped (and they may not be full XMPP
+// stanzas). The problem needs to be fixed either in XmppClient on
+// ChromeAsyncSocket (e.g. ChromeAsyncSocket could close the connection when
+// buffer is full).
+const size_t kReadBufferSize = 64 * 1024;
+const size_t kWriteBufferSize = 64 * 1024;
namespace remoting {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698