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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Fri Feb 17 06:46:32 UTC 2017


 net/loolnb.cpp |    4 ++--
 net/socket.hpp |    9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 1ed042f9ca44f8dece80869b0c48156f4e84f71f
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Thu Feb 16 21:34:54 2017 -0500

    nb: ClientSocket -> StreamSocket
    
    StreamSocket has nothing Client-side specific.
    
    Indeed it could be used on the Server-side.
    
    As such, it's data-streaming, rather than client,
    hence the new name.
    
    Change-Id: I4e048def968b3a12e11edb49760ed03e3843ae6b
    Reviewed-on: https://gerrit.libreoffice.org/34351
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/net/loolnb.cpp b/net/loolnb.cpp
index dbbda3f..742c883 100644
--- a/net/loolnb.cpp
+++ b/net/loolnb.cpp
@@ -34,7 +34,7 @@ constexpr int PortNumber = 9191;
 
 static std::string computeAccept(const std::string &key);
 
-class SimpleResponseClient : public ClientSocket
+class SimpleResponseClient : public StreamSocket
 {
     int _wsVersion;
     std::string _wsKey;
@@ -44,7 +44,7 @@ class SimpleResponseClient : public ClientSocket
 
 public:
     SimpleResponseClient(const int fd) :
-        ClientSocket(fd),
+        StreamSocket(fd),
         _wsVersion(0),
         _wsState(HTTP)
     {
diff --git a/net/socket.hpp b/net/socket.hpp
index 2e23c7c..0ca0eb6 100644
--- a/net/socket.hpp
+++ b/net/socket.hpp
@@ -279,11 +279,12 @@ private:
 };
 
 
-/// A non-blocking, client socket.
-class ClientSocket : public Socket
+/// A non-blocking, data streaming socket.
+/// Buffers and pumps data based on poll events.
+class StreamSocket : public Socket
 {
 public:
-    ClientSocket() :
+    StreamSocket() :
         Socket()
     {
     }
@@ -355,7 +356,7 @@ public:
     virtual void handleIncomingMessage() = 0;
 
 protected:
-    ClientSocket(const int fd) :
+    StreamSocket(const int fd) :
         Socket(fd)
     {
     }


More information about the Libreoffice-commits mailing list