summaryrefslogtreecommitdiff
path: root/src/OptionHandlerFactory.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-11-28 14:01:24 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-11-28 14:12:23 +0900
commite8a9a366db7bf834a3e93c6ec05336e5aca882c4 (patch)
tree01a422d15502dac3a117a80df17781b482773015 /src/OptionHandlerFactory.cc
parent699f04d0b8a93dd92a85f68cd8c307b5f3fb4741 (diff)
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
Diffstat (limited to 'src/OptionHandlerFactory.cc')
-rw-r--r--src/OptionHandlerFactory.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
index 85642c4b..3967d3c7 100644
--- a/src/OptionHandlerFactory.cc
+++ b/src/OptionHandlerFactory.cc
@@ -812,6 +812,16 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
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,
TEXT_STOP,