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/OptionHandlerFactory.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/OptionHandlerFactory.cc') diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 85642c4b..3967d3c7 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -811,6 +811,16 @@ std::vector OptionHandlerFactory::createOptionHandlers() op->addTag(TAG_ADVANCED); handlers.push_back(op); } + { + OptionHandler* op(new UnitNumberOptionHandler + (PREF_SOCKET_RECV_BUFFER_SIZE, + TEXT_SOCKET_RECV_BUFFER_SIZE, + "0", + 0, + 16_m)); + op->addTag(TAG_ADVANCED); + handlers.push_back(op); + } { OptionHandler* op(new NumberOptionHandler (PREF_STOP, -- cgit