summaryrefslogtreecommitdiff
path: root/src/network/socket_handler.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-02-27 23:43:05 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-02-27 23:43:05 +0100
commitdf774d45a9754274a1701d801e4a42e71d38c97c (patch)
tree862200bfd6154a9f3c4b88aefeb6e6ba27f1a078 /src/network/socket_handler.hpp
parente2b9e80244abe0712b8d7e3a8f9e3a3474072a4b (diff)
downloadbiboumi-df774d45a9754274a1701d801e4a42e71d38c97c.tar.gz
biboumi-df774d45a9754274a1701d801e4a42e71d38c97c.tar.bz2
biboumi-df774d45a9754274a1701d801e4a42e71d38c97c.tar.xz
biboumi-df774d45a9754274a1701d801e4a42e71d38c97c.zip
Use scatter/gather io with sendmsg to avoid concataning strings all the time
Diffstat (limited to 'src/network/socket_handler.hpp')
-rw-r--r--src/network/socket_handler.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/socket_handler.hpp b/src/network/socket_handler.hpp
index fcc8734..8828596 100644
--- a/src/network/socket_handler.hpp
+++ b/src/network/socket_handler.hpp
@@ -5,8 +5,9 @@
#include <sys/socket.h>
#include <netdb.h>
-#include <string>
#include <utility>
+#include <string>
+#include <list>
typedef int socket_t;
@@ -91,7 +92,7 @@ protected:
/**
* Where data is added, when we want to send something to the client.
*/
- std::string out_buf;
+ std::list<std::string> out_buf;
/**
* A pointer to the poller that manages us, because we need to communicate
* with it, sometimes (for example to tell it that he now needs to watch