aboutsummaryrefslogtreecommitdiffstats
path: root/fnet
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2021-06-15 12:32:26 +0000
committerHåvard Pettersen <havardpe@oath.com>2021-06-15 12:32:26 +0000
commit52885dcef03e4c58ccaaf337c58d815ea770512e (patch)
tree67813005513587138d98ab30d99be10cc2812cba /fnet
parent4d9e59067045283489c8058ef070bc3baa0bc5c5 (diff)
start with zero-size buffers
Diffstat (limited to 'fnet')
-rw-r--r--fnet/src/vespa/fnet/connection.cpp8
-rw-r--r--fnet/src/vespa/fnet/connection.h5
2 files changed, 7 insertions, 6 deletions
diff --git a/fnet/src/vespa/fnet/connection.cpp b/fnet/src/vespa/fnet/connection.cpp
index 47d6a1e429a..4315e76f7ef 100644
--- a/fnet/src/vespa/fnet/connection.cpp
+++ b/fnet/src/vespa/fnet/connection.cpp
@@ -491,10 +491,10 @@ FNET_Connection::FNET_Connection(FNET_TransportThread *owner,
_packetCHID(0),
_writeWork(0),
_currentID(1), // <-- NB
- _input(FNET_READ_SIZE * 2),
+ _input(0),
_queue(256),
_myQueue(256),
- _output(FNET_WRITE_SIZE * 2),
+ _output(0),
_channels(),
_callbackTarget(nullptr),
_cleanup(nullptr)
@@ -525,10 +525,10 @@ FNET_Connection::FNET_Connection(FNET_TransportThread *owner,
_packetCHID(0),
_writeWork(0),
_currentID(0),
- _input(FNET_READ_SIZE * 2),
+ _input(0),
_queue(256),
_myQueue(256),
- _output(FNET_WRITE_SIZE * 2),
+ _output(0),
_channels(),
_callbackTarget(nullptr),
_cleanup(nullptr)
diff --git a/fnet/src/vespa/fnet/connection.h b/fnet/src/vespa/fnet/connection.h
index 3da9b58f928..532bd7c6638 100644
--- a/fnet/src/vespa/fnet/connection.h
+++ b/fnet/src/vespa/fnet/connection.h
@@ -11,6 +11,7 @@
#include <vespa/vespalib/net/socket_handle.h>
#include <vespa/vespalib/net/async_resolver.h>
#include <vespa/vespalib/net/crypto_socket.h>
+#include <vespa/vespalib/util/size_literals.h>
#include <atomic>
class FNET_IPacketStreamer;
@@ -60,9 +61,9 @@ public:
};
enum {
- FNET_READ_SIZE = 32768,
+ FNET_READ_SIZE = 16_Ki,
FNET_READ_REDO = 10,
- FNET_WRITE_SIZE = 32768,
+ FNET_WRITE_SIZE = 16_Ki,
FNET_WRITE_REDO = 10
};