diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-09-21 17:11:22 +0200 |
---|---|---|
committer | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-09-30 09:17:13 +0200 |
commit | 3476dd9ddecc87d9212c3bf56a5be52079e27def (patch) | |
tree | 3c7ea2664e8f99fc4fd4588b9e4493f0dc9bbb93 /libtransport/src/implementation/socket_consumer.h | |
parent | 29647f687c8dadc90e2ba4d3a772eee09a1a4f1b (diff) |
feat: support for new packet format in hicn-light
Ref: HICN-792
Change-Id: I3204006bd2dd2be6504c33035c6578ec0292455a
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'libtransport/src/implementation/socket_consumer.h')
-rw-r--r-- | libtransport/src/implementation/socket_consumer.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libtransport/src/implementation/socket_consumer.h b/libtransport/src/implementation/socket_consumer.h index 4721f426c..3117e21e7 100644 --- a/libtransport/src/implementation/socket_consumer.h +++ b/libtransport/src/implementation/socket_consumer.h @@ -39,6 +39,7 @@ class ConsumerSocket : public Socket { std::shared_ptr<core::Portal> &&portal) : Socket(std::move(portal)), consumer_interface_(consumer), + packet_format_(default_values::packet_format), interest_lifetime_(default_values::interest_lifetime), min_window_size_(default_values::min_window_size), max_window_size_(default_values::max_window_size), @@ -273,6 +274,10 @@ class ConsumerSocket : public Socket { manifest_factor_alert_ = socket_option_value; break; + case GeneralTransportOptions::PACKET_FORMAT: + packet_format_ = socket_option_value; + break; + default: return SOCKET_OPTION_NOT_SET; } @@ -318,7 +323,6 @@ class ConsumerSocket : public Socket { on_content_object_input_ = VOID_HANDLER; break; } - default: return SOCKET_OPTION_NOT_SET; } @@ -602,6 +606,10 @@ class ConsumerSocket : public Socket { socket_option_value = manifest_factor_alert_; break; + case GeneralTransportOptions::PACKET_FORMAT: + socket_option_value = packet_format_; + break; + default: return SOCKET_OPTION_NOT_GET; } @@ -854,6 +862,7 @@ class ConsumerSocket : public Socket { // set from the consume Name network_name_; + hicn_packet_format_t packet_format_; int interest_lifetime_; double min_window_size_; |