From 09fb1366d42de04a428d6a2b0607d4cca878eee7 Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Fri, 13 Dec 2019 20:51:05 +0000 Subject: [HICN-458] Setting data packet size socket option when the payload size is passed Signed-off-by: Alberto Compagno Change-Id: Ie0ee26a1e8bff3279cc88c4e7c09b0fdb23924c1 --- utils/src/hiperf.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'utils/src') diff --git a/utils/src/hiperf.cc b/utils/src/hiperf.cc index eabd12c86..008bd0c55 100644 --- a/utils/src/hiperf.cc +++ b/utils/src/hiperf.cc @@ -165,7 +165,7 @@ struct ServerConfiguration { rtc_(false), interactive_(false), production_rate_(std::string("2048kbps")), - payload_size_(1400) + payload_size_(1440) #ifdef SECURE_HICNTRANSPORT , secure_(false) @@ -896,6 +896,11 @@ class HIperfServer { } } + producer_socket_->setSocketOption( + GeneralTransportOptions::DATA_PACKET_SIZE, + (uint32_t)( + configuration_.payload_size_ + + (configuration_.name.getAddressFamily() == AF_INET ? 40 : 60))); producer_socket_->registerPrefix(configuration_.name); producer_socket_->connect(); -- cgit 1.2.3-korg