diff options
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; |