[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - net/socket.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Feb 20 04:38:58 UTC 2017


 net/socket.hpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 0f774163e05b1763ba73eebd9428988c874af4fc
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Feb 19 20:56:01 2017 -0500

    nb: use 16kb socket read buffer to match SSL
    
    SSL's decryption frame is 16kb, so it
    makes sense to read by that multiple
    for efficiency reasons.
    
    Change-Id: Ib5d7b5bfc18fa1b27bcbc9aac93350c4e1292874
    Reviewed-on: https://gerrit.libreoffice.org/34451
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/net/socket.hpp b/net/socket.hpp
index cea6fac..3119834 100644
--- a/net/socket.hpp
+++ b/net/socket.hpp
@@ -330,8 +330,9 @@ public:
     /// Return false iff the socket is closed.
     virtual bool readIncomingData()
     {
+        // SSL decodes blocks of 16Kb, so for efficiency we use the same.
+        char buf[16 * 1024];
         ssize_t len;
-        char buf[4096];
         do
         {
             // Drain the read buffer.


More information about the Libreoffice-commits mailing list