diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-11-28 14:01:24 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-11-28 14:12:23 +0900 |
| commit | e8a9a366db7bf834a3e93c6ec05336e5aca882c4 (patch) | |
| tree | 01a422d15502dac3a117a80df17781b482773015 /src/Context.cc | |
| parent | 699f04d0b8a93dd92a85f68cd8c307b5f3fb4741 (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/Context.cc')
| -rw-r--r-- | src/Context.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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()) { |
