From e8a9a366db7bf834a3e93c6ec05336e5aca882c4 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 28 Nov 2015 14:01:24 +0900 Subject: Add --socket-recv-buffer-size option Set the maximum socket receive buffer in bytes. Specifing 0 will disable this option. This value will be set to socket file descriptor using SO_RCVBUF socket option with setsockopt() call. See GH-487 about the usecase of this option --- src/Context.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Context.cc') diff --git a/src/Context.cc b/src/Context.cc index 70bbb4e5..1f6d8d10 100644 --- a/src/Context.cc +++ b/src/Context.cc @@ -223,6 +223,8 @@ Context::Context(bool standalone, setDefaultAIFlags(0); } SocketCore::setIpDscp(op->getAsInt(PREF_DSCP)); + SocketCore::setSocketRecvBufferSize(op->getAsInt + (PREF_SOCKET_RECV_BUFFER_SIZE)); net::checkAddrconfig(); // Bind interface if(!op->get(PREF_INTERFACE).empty()) { -- cgit