summaryrefslogtreecommitdiff
path: root/src/network/socket_handler.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-12-21 21:04:31 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-12-23 17:07:43 +0100
commit2ecb637f0c4a97643962d1703f208d1b1baf7e9b (patch)
tree29c3aaa7c444cd8ac50c93c35be728f1203e72d9 /src/network/socket_handler.cpp
parente35472a6cbc5ffecf0413c2c7da1e2552230d227 (diff)
downloadbiboumi-2ecb637f0c4a97643962d1703f208d1b1baf7e9b.tar.gz
biboumi-2ecb637f0c4a97643962d1703f208d1b1baf7e9b.tar.bz2
biboumi-2ecb637f0c4a97643962d1703f208d1b1baf7e9b.tar.xz
biboumi-2ecb637f0c4a97643962d1703f208d1b1baf7e9b.zip
Read a variable number of bytes, 4096 by default
Diffstat (limited to 'src/network/socket_handler.cpp')
-rw-r--r--src/network/socket_handler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/socket_handler.cpp b/src/network/socket_handler.cpp
index 246d8d3..e3973f1 100644
--- a/src/network/socket_handler.cpp
+++ b/src/network/socket_handler.cpp
@@ -61,11 +61,11 @@ void SocketHandler::set_poller(Poller* poller)
this->poller = poller;
}
-void SocketHandler::on_recv()
+void SocketHandler::on_recv(const size_t nb)
{
char buf[4096];
- ssize_t size = ::recv(this->socket, buf, 4096, 0);
+ ssize_t size = ::recv(this->socket, buf, nb, 0);
if (0 == size)
{
this->on_connection_close();