diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-12-01 14:47:06 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-12-01 14:47:06 +0000 |
commit | 1e0886545cdb582528998d3d40d337ebd71ccc08 (patch) | |
tree | 6d27145bab62ed91e7a49c2c64c544972176e9c2 /fnet/src | |
parent | 9741a44eaeec1f922696d776053ca2e108554d4e (diff) |
Move config setters directly onto main TransportConfig object
Diffstat (limited to 'fnet/src')
-rw-r--r-- | fnet/src/vespa/fnet/config.h | 19 | ||||
-rw-r--r-- | fnet/src/vespa/fnet/transport.h | 24 |
2 files changed, 19 insertions, 24 deletions
diff --git a/fnet/src/vespa/fnet/config.h b/fnet/src/vespa/fnet/config.h index 508cb26c36f..f512d7cde75 100644 --- a/fnet/src/vespa/fnet/config.h +++ b/fnet/src/vespa/fnet/config.h @@ -18,23 +18,4 @@ public: bool _tcpNoDelay; FNET_Config(); - FNET_Config & events_before_wakeup(uint32_t v) { - if (v > 1) { - _events_before_wakeup = v; - } - return *this; - } - FNET_Config & maxInputBufferSize(uint32_t v) { - _maxInputBufferSize = v; - return *this; - } - FNET_Config & maxOutputBufferSize(uint32_t v) { - _maxOutputBufferSize = v; - return *this; - } - FNET_Config & tcpNoDelay(bool v) { - _tcpNoDelay = v; - return *this; - } - }; diff --git a/fnet/src/vespa/fnet/transport.h b/fnet/src/vespa/fnet/transport.h index 6557c372a4d..766eaa3ccaa 100644 --- a/fnet/src/vespa/fnet/transport.h +++ b/fnet/src/vespa/fnet/transport.h @@ -32,13 +32,27 @@ public: _crypto = std::move(crypto_in); return *this; } - TransportConfig & config(const FNET_Config & config_in) { - _config = config_in; - return *this; - } const FNET_Config & config() const { return _config; } - FNET_Config & config() { return _config; } uint32_t num_threads() const { return _num_threads; } + + TransportConfig & events_before_wakeup(uint32_t v) { + if (v > 1) { + _config._events_before_wakeup = v; + } + return *this; + } + TransportConfig & maxInputBufferSize(uint32_t v) { + _config._maxInputBufferSize = v; + return *this; + } + TransportConfig & maxOutputBufferSize(uint32_t v) { + _config._maxOutputBufferSize = v; + return *this; + } + TransportConfig & tcpNoDelay(bool v) { + _config._tcpNoDelay = v; + return *this; + } private: FNET_Config _config; vespalib::AsyncResolver::SP _resolver; |