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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 10919167: Increase the sizes of the circular buffers used by SSLClientSocketNSS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
Index: net/socket/ssl_client_socket_nss.cc
===================================================================
--- net/socket/ssl_client_socket_nss.cc (revision 155503)
+++ net/socket/ssl_client_socket_nss.cc (working copy)
@@ -118,7 +118,12 @@
#include <dlfcn.h>
#endif
-static const int kRecvBufferSize = 4096;
+// Common Read output buffer sizes are 4KB and 8KB. Use a receive input buffer
wtc 2012/09/07 23:18:54 I saw the 4KB and 8KB Read() input buffer sizes wh
Ryan Sleevi 2012/09/08 01:14:57 Considering this represents a network buffer, it s
+// size large enough to hold 8KB + SSL overhead.
+static const int kRecvBufferSize = 9 * 1024;
+// The largest Write input buffer size is 16KB. Use a send output buffer size
+// largest enough to hold 16KB + SSL overhead (often 25 bytes).
wtc 2012/09/10 22:51:37 Your comment caused me to realize that NSS sends o
wtc 2012/09/10 22:56:25 To expand on my previous comment: if the network s
Ryan Sleevi 2012/09/10 23:20:31 Right, I followed what you meant. NSS's strategy
+static const int kSendBufferSize = 17 * 1024;
#if defined(OS_WIN)
// CERT_OCSP_RESPONSE_PROP_ID is only implemented on Vista+, but it can be
@@ -3067,8 +3072,7 @@
int SSLClientSocketNSS::InitializeSSLOptions() {
// Transport connected, now hook it up to nss
- // TODO(port): specify rx and tx buffer sizes separately
- nss_fd_ = memio_CreateIOLayer(kRecvBufferSize);
+ nss_fd_ = memio_CreateIOLayer(kRecvBufferSize, kSendBufferSize);
if (nss_fd_ == NULL) {
return ERR_OUT_OF_MEMORY; // TODO(port): map NSPR error code.
}

Powered by Google App Engine
This is Rietveld 408576698