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/SocketCore.h | |
| 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/SocketCore.h')
| -rw-r--r-- | src/SocketCore.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/SocketCore.h b/src/SocketCore.h index de8e6cd2..9b346666 100644 --- a/src/SocketCore.h +++ b/src/SocketCore.h @@ -76,6 +76,8 @@ private: static std::vector<std::vector<std::pair<sockaddr_union, socklen_t> > > bindAddrsList_; static std::vector<std::vector<std::pair<sockaddr_union, socklen_t> > >::iterator bindAddrsListIt_; + static int socketRecvBufferSize_; + bool blocking_; int secure_; @@ -359,6 +361,9 @@ public: protocolFamily_ = protocolFamily; } + static void setSocketRecvBufferSize(int size); + static int getSocketRecvBufferSize(); + // Bind socket to interface. interface may be specified as a // hostname, IP address or interface name like eth0. If the given // interface is not found or binding socket is failed, exception |
